I need to write an application which takes certain data out of teststand generated XML report. I am new in processing XML files in labview and I'm wondering how should I do it. (Attached the first first couple lines of my report and the VI I wrote.)
My basic problem is like this: I know that the serial number is under /Reports/Report/Prop/Prop/[Value], but how should I address this particular element?
I would understand this if it would be like /Reports/Report/UUT/SerialNumber/[value], because then I could address it easily, but instead of this the /Reports/Report has gazillion children named "Prop", so I first need to find the Prop which has the name of "UUT" then its child which has the name of "SerialNumber" to get the value.
Not sure if my problem description makes sense, I'm certainly unsure about the terminology. I guess my main question is if there is an easy way to find things in a teststand XML (mostly measurement results)?
Solved! Go to Solution.
there is vi in xml pallet Get all Matched nodes.vi which might help you, & an example is available.
sorry I wasn't trolling, I was talking about the following example, which lists the properties by passing query.
I'm aware of this example, but its not applicable for me as the example takes elements of an XML in which all the nodes have the same data structure.
So the nodes can be addressed like this:
and then using the "Get Node Text Content.VI" could read the value tag. Not sure if this is the best solution but certainly resolves the problem I have.