Jump to content


Photo

Parse in big XML generated by Testastand


  • Please log in to reply
5 replies to this topic

#1 Carmine DErrico

Carmine DErrico
  • Members
  • 3 posts

Posted 29 October 2014 - 03:55 PM

Hallo!

First of alla I declare that Im not skilled with XML.

Ive 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 cant make this with the Lybraries.

Can you help me with an example?

Thank you.

Ciao!
Carmine

Attached Files


  • 0

#2 Carmine DErrico

Carmine DErrico
  • Members
  • 3 posts

Posted 30 October 2014 - 09:58 AM

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

Attached Files


  • 0

#3 Jim Kring

Jim Kring
  • JKI Team
  • 1,267 posts

Posted 31 October 2014 - 06:13 PM

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!
  • 0

#4 Carmine DErrico

Carmine DErrico
  • Members
  • 3 posts

Posted 04 November 2014 - 04:08 PM

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
  • 0

#5 Jim Kring

Jim Kring
  • JKI Team
  • 1,267 posts

Posted 04 November 2014 - 04:54 PM

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
  • 0

#6 Jim Kring

Jim Kring
  • JKI Team
  • 1,267 posts

Posted 09 August 2016 - 06:07 PM

Update: I've added a little bit of documentation about this, here:

 

https://github.com/J...tring-labelname


  • 0