10-13-2020 09:01 AM - edited 10-13-2020 09:42 AM
Hi all,
I have to parse a large xml file and had performance issue with xml functions proposed by LabVIEW.
instead, i used the microsoft System.Xml.XmlReader .net dll
found in System.XML(4.0.0.0) / System.xml / XmlReader.
it works fine and far faster.
I've built a .net dll in LabVIEW that used this assembly.
when I'm using this dll in other LabVIEW project, it works fine, but if i call the dll in TestStand, i got Error 1.
I even tried to call the dll from python, and it works fine.
PS : If i call directly the System.Xml.XmlReader .net dll in TestStand, i don't get any Error.
I'm using LabVIEW and TestStand 2017.
any clue to resolve this issue ?
I've attached an example that allow to reproduce the issue.
Thanks All.
Solved! Go to Solution.
10-13-2020 09:56 AM
Ugh. ANYthing is faster than the native LV XML parser. I believe VIPM has at least one based on EasyXML - but, ironically, it's harder to use. Faster, though. I've seen some versions of this that are hundreds of times faster than the native XML functions.
10-13-2020 10:04 AM
Hi, I tried the JKI easy XML from VI Package Manager,
I used it for a while. it is indeed faster than default LabVIEW functions, but in comparison with xmlReader microsoft .net ... there is still some progress to made 😉
10-16-2020 02:20 AM
Hi.
No one else have an idea ? :'(
Thanks.
10-16-2020 12:43 PM
I've gotten LabXML working and it seems to go pretty fast. It hasn't been updated in 14 years but still worked OK when I tried it out in LabVIEW 2018.
10-16-2020 09:35 PM
@Kyle97330 wrote:
I've gotten LabXML working and it seems to go pretty fast. It hasn't been updated in 14 years but still worked OK when I tried it out in LabVIEW 2018.
I believe this one is literally hundreds of times faster than the native parser.
10-17-2020 03:17 PM - edited 10-17-2020 03:20 PM
Hi,
thanks for your answer, i did not know that project.
i just tried it and it took 60+ seconds to read my file, while my project with xmlReader took 5s (35000*4 Elements to read)
i'll do some more tests to see if i missed something but it did not looks that fast to me ^^
10-19-2020 09:33 AM - edited 10-19-2020 09:36 AM
Hi,
I did not managed to parse my xml file faster than with xmlReader.
but as i just need to extract the xml data and use them as a csv file, i'm using an xslt file and use the function provided by the libxml project to convert xml file from an xslt.
http://xmlsoft.org/XSLT/tutorial/libxslttutorial.html
it works (fast ~3s) so it will be ok.
_____________
by the way, the system .net assambly also have some function to use an xslt file ... but i got the same error msg than with the xmlReader when using in TestStand. i don't understand why :'(
Thanks Kyle97330 for your link 🙂
10-19-2020 09:42 AM
Hi,
I did not managed to parse my xml file faster than with xmlReader.
but as i just need to extract the xml data and use them as a csv file, i'm using an xslt file and use the function provided by the libxml project to convert xml file from an xslt.
http://xmlsoft.org/XSLT/tutorial/libxslttutorial.htm
it works (fast ~3s) so it will be ok.
_____________
by the way, the system .net assambly also have some functions to use an xslt file ... but i got the same error msg than with the xmlReader when using in TestStand. i don't understand why :'(
Thanks Kyle97330 for your link 🙂