Carmine DErrico Posted October 29, 2014 Report Share Posted October 29, 2014 Hallo! First of alla I declare that I´m not skilled with XML. I´ve a big .XML file generated by TestStand. I have to recognize a special Dataset and not All dataset. For example in the attached XML I want to extract only the ARRAY from: TestResultCollection > TestResults > TestGroup > Test. I tried to build a Labview-Cluster type but at the moment I can´t make this with the Lybraries. Can you help me with an example? Thank you. Ciao! Carmine test_01_ok.xml Link to comment Share on other sites More sharing options...
Carmine DErrico Posted October 30, 2014 Author Report Share Posted October 30, 2014 With a great work I was able to extract data. I attach the solution, in order to leave other people to understand. I think that this library is not very powerful. For big XML build a Cluster-Dataset is so difficult and you can have very much problem. in C/C++/Jave there are libraries that allows you directly data extract, for example: A=Node_A.Node_.Code_C.attribute_a This can be a very good solution. Ciao! Carmine Neue_Parser.vi Link to comment Share on other sites More sharing options...
Jim Kring Posted October 31, 2014 Report Share Posted October 31, 2014 Hello Carmine, I'm glad you figured out the solution -- yes, this is the approach. You're right that it would be nice to provide a more direct way to extract the data of interest, in some cases. Thanks! Link to comment Share on other sites More sharing options...
Carmine DErrico Posted November 4, 2014 Author Report Share Posted November 4, 2014 Hello Jim, if I buy the full library there is a way for the direct access to XML records without building a data structure? Carmine Link to comment Share on other sites More sharing options...
Jim Kring Posted November 4, 2014 Report Share Posted November 4, 2014 Hello Jim, if I buy the full library there is a way for the direct access to XML records without building a data structure? Carmine Hi Carmine, No, EasyXML requires that a data structure be passed in. However, there are some ways to make EasyXML and your data structures more flexible. If you change one of your clusters (or other any other LabVIEW types) to a string data type and add the "#xml" hashtag to the end (e.g. "TestResult #xml"), then EasyXML will return the data as a string. This is sometimes helpful if your structures have types that can vary. -Jim Link to comment Share on other sites More sharing options...
Jim Kring Posted August 9, 2016 Report Share Posted August 9, 2016 Update: I've added a little bit of documentation about this, here: https://github.com/JKISoftware/JKI-EasyXML/blob/master/README.md#reading-raw-xml-into-strings-using-the-xml-suffix-in-string-labelname Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.