04-13-2015 10:32 AM
Dear all
I am trying to find all nodes in my XML file which match a given type. I have tried with "Get all matched nodes" VI, but this only searches within one level of the document´s hierarchy at a time.
As the structure of the XML files I´m analysing is unknown, it seems a bit complicated to guranteed an exhaustive search using this method. I´m aware of parsing methods in C# and Python which can search for all nodes in the document, regardless their hirarchical level. Does somebody know if there is one method like that in LabVIEW or any other reasonable solution?
Regards,
Esteban
Solved! Go to Solution.
04-13-2015 01:55 PM
Read up on XPath. My experience with processing XML is not large enough to be able to say that you can, but this should put you on the right path to find the relevant XPath syntax, assuming it exists.
04-13-2015 02:11 PM
04-14-2015 08:44 AM
Thanks guys.
That solves the problem.
Do you perhaps happen to know how can I retrieve an attribute by name when not having the certainty it exists. In other words, I want to ask first if an attrubute called "transform" exists, and if it does retrieve its value.
I have tried with the property NameNodeMap which works good when the attribute exists. However, this property promts error it the attribute was not found.
Best regards,
Esteban
04-14-2015 09:32 AM