06-06-2017 01:07 AM
Hello,
Currently, I am trying to Parse attached XML File generated from Test Stand using Easy XML which contains TWO Test Results from Two different sequences. Please find the attached VI, which I am using. I have tried different options to parse both the Test Results by changing cluster constant as mentioned in below snapshot. Can you please let me know where I am going wrong? Thanks.
Regards,
Karthik
06-06-2017 03:17 AM
06-06-2017 09:17 AM
Hello Cbutcher, Thanks for your response. Please find the attached XML file. Also, I have observed that not all the values are generated from the XML to Cluster in the VI. Let me know your comments. Thanks.
Regards,
Karthik
06-06-2017 11:33 AM - edited 06-06-2017 11:34 AM
What's not working?
06-06-2017 12:17 PM
There are several XML "packages" for LabVIEW. All that I've tested are "self-consistent", that is, if you generate XML from LabVIEW structures, you can parse that XML and get the structures back. However, I'm less sure that they are "cross-consistent". In particular, the code generated by TestStand might not be exactly the same "flavor" of XML as JKI's EasyXML.
Have you tried reading your XML file with NI's XML functions? [Too bad you don't have a smaller, simpler example ...].
Bob Schor
06-06-2017 07:12 PM
Hello Bill, Currently, the XML file generated from Test Stand contain results of two test sequences executed in Parallel. While I am parsing, I am able to parse the data related to only one test sequence (Not all elements). I am unable to parse the data for another test sequence which is available in the same XML file. I had tried to change the Cluster constant to match the XML format, but I did not have any luck parsing both the test results from the XML file. Thanks for your support.
Karthik
06-06-2017 09:51 PM
For me, reading an xml file with anything is a slow and tedious effort and I just have to keep chugging away until I finally get it right. It sounds like you mostly have it right, because if you can read one test, you are very close to reading them all. It could be almost as simple as putting your code in a loop.
06-06-2017 11:56 PM
Hope the file you have shared is not the proper XML Formatted data.
For well XML Formatted data you can use http://xmlgrid.net/
Which will give you parsed data and even xpath can be generated using that tool.
06-07-2017 08:40 AM - edited 06-07-2017 08:41 AM
@Karthik_Moog wrote:
Hello Bill, Currently, the XML file generated from Test Stand contain results of two test sequences executed in Parallel. While I am parsing, I am able to parse the data related to only one test sequence (Not all elements). I am unable to parse the data for another test sequence which is available in the same XML file. I had tried to change the Cluster constant to match the XML format, but I did not have any luck parsing both the test results from the XML file. Thanks for your support.
Karthik
What is basically missing is that you need to have an array of tr:ResultSet and label this array trc:TestResults. Also, since you have the JKI Easy XML toolkit it would be much simpler to directly use the Easy Read XML File vi.
Ben64
06-08-2017 02:03 AM
@ben64 wrote:
@Karthik_Moog wrote:
Hello Bill, Currently, the XML file generated from Test Stand contain results of two test sequences executed in Parallel. While I am parsing, I am able to parse the data related to only one test sequence (Not all elements). I am unable to parse the data for another test sequence which is available in the same XML file. I had tried to change the Cluster constant to match the XML format, but I did not have any luck parsing both the test results from the XML file. Thanks for your support.
Karthik
What is basically missing is that you need to have an array of tr:ResultSet and label this array trc:TestResults. Also, since you have the JKI Easy XML toolkit it would be much simpler to directly use the Easy Read XML File vi.
Ben64
I was close. 😄