LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about reading xml files from labview

I am trying to read an xml file from Labview but I am running in some problems. Firstly, unless I add the tags of and to my xml file manually, labview dosen't read the file. Is there someway I can get rid of this problem? Because none of the xml files I am trying to read have these tags and I do not want to manually go in and write these two tags into the file before reading everytime. I think the reason might be that the xml files I am trying to read are not compatible with the labview xml schema. I haven't worked a lot with xml files before, so I dont really know how to correct this problem.

The other problem I am having is that one of the xml files that I am trying to read through labiew is really big (ard 5.7MB). When I run the vi to read this file, it just keeps running forever unless I manually stop the execution and at the end of this execution, nothing gets read. When I deleted around 90% of the contents of this file and then tried reading again, it worked. So is it just the size of the file that creates a problem? Do you have any suggestions on perhaps some alternative way of reading such big files from labview?

Thanks

Anuj
0 Kudos
Message 1 of 4
(2,896 Views)
In my initial post, I missed the tag names in the first line, they are "" and ""
0 Kudos
Message 2 of 4
(2,881 Views)
Looks like tags just dont show up on these posts. The tag names are version and LVData

apologies for the inconvenience.

ANuj
0 Kudos
Message 3 of 4
(2,879 Views)
You can always parse and use xml data using the activeX classes provided through MSXML (I have version 4.0 with labview). These classes allow for the XML text to be load into a DOM and then you can parse and select children nodes and have full control over the data. One warning is that I found this to be a decent learning curve, but some documentation is provided through MSDN on the web. Good Luck
-Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 4
(2,877 Views)