NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Parse XML File in TestStand

Hi,
I've generated an XML file from TestStand (Attached in zip file). This XML file has the same tag name with different space indents.
Is there any way to get the details in LabVIEW easily (Like Get all Parent names in first indent etc)

0 Kudos
Message 1 of 4
(3,934 Views)

You can use the XML parser in LabVIEW to get that information.  Below is an example program to get all of the names within MyContainer1; it returns an array with "MySubContainer1,MyString1".

Message 2 of 4
(3,860 Views)

Thanks a lot, pulidotech.
I'm able to get the String Name but is there any way values too.
Ultimately I need XML conversion in LabVIEW as an shown in attachment.

0 Kudos
Message 3 of 4
(3,845 Views)

The search string can be modified such that you can go as far down as you wish.  For example, to get the value of MyNumber1, you could change the search string to:

/Prop[@Name='Parameters']/Prop[@Name='MyContainer1']/Prop[@Name='MySubContainer1']/Prop[@Name='MyNumber1']/Value

0 Kudos
Message 4 of 4
(3,823 Views)