02-17-2011 11:45 AM
Hello,
I would like to know how to extract xml node attributes without knowing the names of those attributes. Is it possible using the XML parser of labvew 2010?
For example say I am reading in the below xml structure:
<node_1>
<node_2 name = second_node> text </node_2>
<node_3 type = a>
<node_4> text </node_4>
</node_3>
</node_1>
The programmer has no knowledge of the xml structure or content when writing. How do I extract the attributes of each node?
i.e. giving the results: { {name, second_node}, {type, a"} } .
Thank you,
labjunky
Solved! Go to Solution.
02-17-2011 12:11 PM
Assuming you are actually going to provide well-formed XML with quotes around the attribute values, XPath is your friend.
02-17-2011 08:05 PM
Darin, thanks a lot!
XPath is great.
Do you know a good reference for more such tips and tricks?
thanks again,
labJunky