- Flexera Community
- :
- FlexNet Manager
- :
- FlexNet Manager Forum
- :
- Re: Convert .ndi files to csv?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Convert .ndi files to csv?
Anyone have an suggestions on how to do this? Have have classified labs that need to scrub the .ndi files before they can send over to the non-classified area. They want to see the ndi file as a CSV file.
This thread has been automatically locked due to inactivity.
To continue the discussion, please start a new thread.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would suggest to pull resolved inventory data from inventory database and save it as CVS that will quicker and better option.
Other option is to parse ndi XML to csv e.g. in the example below it is snippet of hardware class from ndi XML. you can pull in the following format in the CSV. It mean you need separate different type of evidence within the CSV that is why i am suggesting pulling from the database will be easier option.
ClassName, ClassNameValue, PropertyName, PropertyValue, Source
Win32_ComputerSystem, ABCDEFGH, Manufacturer, VMware, Inc., WMI
<Hardware Class="Win32_ComputerSystem" Name="ABCDEFGH" Evidence="WMI">
<Property Name="Manufacturer" Value="VMware, Inc."/>
<Property Name="Model" Value="VMware Virtual Platform"/>
<Property Name="Domain" Value="MY.Domain"/>
<Property Name="DomainRole" Value="3"/>
<Property Name="NumberOfProcessors" Value="2"/>
<Property Name="NumberOfLogicalProcessors" Value="2"/>
<Property Name="TotalPhysicalMemory" Value="8589463552"/>
<Property Name="Status" Value="OK"/>
</Hardware
Cheers,
Aamer
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The .ndi files are in XML format. There is likely some 3rd-party tools that can read/parse the XML into another format such as CSV or Excel.
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you Google 'powershell convert xml to csv' you'll find many PowerShell examples...
Thanks,
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
You could just rename the file to .csv and you had a CSV file. But you'll probably have not much fun with the output. In order to make any sense, you would have to reserve a column for each type and attribute in the xml to make any sense.
Maybe you'll have more luck parsing the xml objects in PowerShell.
Best regards,
Markward
- Mark as New
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CSV files are suited for showing tabular data. However inventory data held in NDI files is a reasonably rich hierarchical format using an XML syntax, so I don't think you will find it easy to represent the data in a tabular CSV form. (In general it is possible and common to represent tabular data in XML format, which can be converted to CSV syntax fairly easily as mentioned in other responses here - but that won't help for NDI files where the data is not tabular in nature.)
If you really wanted to try, one approach may be to consider develop an XML transform to transform all the different elements and attributes found in NDI XML files to a tabular structure - but I expect that would involve more work than you are thinking of here.
