LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read large XML file in LabVIEW

Solved!
Go to solution

Hello,

  

I tried to read large XML file bigger than 450MB.

 

Does anybody had experienced to read large xml file?

 

I'm sorry that cannot attach my xml file due to file size.

 

Thanks

0 Kudos
Message 1 of 4
(2,744 Views)
Solution
Accepted by topic author Oh-Happy

I recommend NOT using LabVIEW's built-in xml support.  It is sloooooow...

Instead, have a look at this thread:

https://forums.ni.com/t5/Example-Program-Drafts/Parsing-XML-is-too-slow-or-is-it/ta-p/3492686

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 4
(2,698 Views)
Solution
Accepted by topic author Oh-Happy

The general XML model is to consider the file as one Top Level Tag, inside of which are one or more specific structured data (by "structured data" I mean things like Arrays, Clusters, simple variables, etc.) in text form that can be read and parsed to create the underlying LabVIEW Variable/Data Type represented by the XML.

 

There are at least three LabVIEW XML Parsing/encoding systems, each of which as slightly different "rules" for how to approach the data file.

 

Because the file is a Text file, you can, in principle, simply look at it with a Text Editor, try to deduce the structure from the XML formatting, and build your own parser (I'm not seriously suggesting you do this, but looking at the file can tell you a lot).  Also, because it is a text file, you could, in principle, say "Oh, there are 1000 records of exactly the same type, so I can split this huge file into 1000 smaller files that have one record each and parse them one at a time".

 

Are you needing to do this on a regular basis?  Do you have a lot of XML files to read/parse?  Are they still being generated?  Is this something that you need to do in LabVIEW?  [This last question is key -- if the data aren't LabVIEW data, then some other XML parser might be much more appropriate].

 

Bob Schor

0 Kudos
Message 3 of 4
(2,694 Views)
Thank you for your advice.
0 Kudos
Message 4 of 4
(2,681 Views)