07-10-2018 07:36 AM - edited 07-10-2018 07:43 AM
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
Solved! Go to Solution.
07-10-2018 10:25 AM
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
07-10-2018 12:41 PM
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
07-10-2018 08:02 PM