LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read data from XML file to LabVIEW

I am writing LabVIEW front panel objects data to an XML file using LabVIEW 6.1 VI. Now, I want to read that XML file in another VI objects. How can I do this?
Download All
0 Kudos
Message 1 of 5
(4,605 Views)
LV version 6.1 has tools for both reading and writing XML files. Check the examples, you should find your answer there.

Mike...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 5
(4,605 Views)
There is an example for writing XML file, but for reading from XML file, there is no example or direct function. I have an XML file & I want to read that XML file in LabVIEW objects.
0 Kudos
Message 3 of 5
(4,605 Views)
You can use the read characters from the File I/O palette, parse the string obtained from the header and footer that are given in "Write to XML file"(double click on the VI to see the code). Header is:


6.1

and footer is:


When the string is parsed, you can use the Unflatten from XML.vi to get back to the original datatype.


Regards,

Cyril Bouton
Applications Engineer
National Instruments
Cyril Bouton
Active LabVIEW Developper
0 Kudos
Message 4 of 5
(4,605 Views)
I may not understand this answer but �Unflatten From XML� is of little use in this parsing because it requires the data type. So it seems that what you are saying is the user has to parse each data value, and then �Unflatten From XML� can help a little.
I would like to see NI provide a VI for parsing it�s own schema.
0 Kudos
Message 5 of 5
(4,605 Views)