03-11-2015 12:38 PM
I was given a measurement file that is stored in XML from which I need to extract certain data. I have spend much of the morning going through all the XML posts I could find trying to figure out how to begin. I have also downloaded the GXML and EasyXML VI packages. The problem is that I can't seem to figure out how to actually use any of these files because all the examples I see are very nice small files and I am not sure how to apply them to my file.
The first thing I am trying to do is to extract data called CentralTilt. If I look at the XML map in Excel it would fall under Acquistions-> SystemConfig->Data. In Excel when I extract that data I get a column of about 1200 values. I am trying to do the same, but place them in an array in Labview.
Ultimately I need to do this of a several other values within the file and then perform some additional manipulation which is why I would like to try to automate this in Labview. I think if I can just get past this first hurdle of not really understanding how these different XML functions call on the file and parse out the data I should be able to figure the rest out. Some guidance would be appreciated. Thanks.
Unfortunately, I cannot post the file as it is too large, but I have a screenshot of the XML map.
Solved! Go to Solution.
03-11-2015 02:16 PM
03-12-2015 09:19 AM
I have LabView 2011 so I cannot open the file. Could you save it to my version. Thanks!
03-12-2015 09:26 AM
03-12-2015 09:38 AM
It loaded just fine and actually returned the very first value for the parameter I was looking for. My next step will be to use this and augment it so it finds all the values. I believe this can be done using the Get All Matched Nodes. Let me know if I am wrong. Thanks!
03-12-2015 09:46 AM
@Cseaman wrote:
It loaded just fine and actually returned the very first value for the parameter I was looking for.
My next step will be to use this and augment it so it finds all the values. I believe this can be done using the Get All Matched Nodes. Let me know if I am wrong. Thanks!
You're right, it can be done using Get All Matched Nodes. It will return an Array of Node References. Put the Get Node Text Reference.VI with its Close.VI in a FOR loop to read all matched nodes values.
Ben64