LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XML and cluster arrays

Hi everybody!
   I'm programming in LabVIEW 7.1.  I have an array of clusters, and I store it in an XML file (see picture 1).

   When I try to open xml file and get data from it (pict 2), I receive an error, (1103) saying that an XML tag specifying data type is not recognized (Possible reason(s):
LabVIEW:  The XML tag describing the type of data is not recognized.).

   Why? Did I miss something?

   Thank you...

graziano


 
Download All
0 Kudos
Message 1 of 6
(3,691 Views)
Hi
 
You have to use the "read from xml-file"-function to read the data, as this function returns an appropriate string, which then can be parsed. You can not use the open file and read string vis - just compare the outputs in a simple string control.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 Kudos
Message 2 of 6
(3,684 Views)
Hi Thomas.
   I already tried to use that VI, "read from xml file", but the problem is quite the same.

   It seems to me that I solved, the problem was that "read from xml file" vi returns an array of string, if I pick up the element 0, that's right for feeding "unflatern from xml".

   Bye!

graziano

0 Kudos
Message 3 of 6
(3,671 Views)
From the error message, I would suspect that there is some sort of syntax error in your xml format.
0 Kudos
Message 4 of 6
(3,667 Views)
...not really!  As I told above, it was only a matter of  "read from xml file" polymorphism.  I had to specify which one of 2 polymorphic aspects I wanted to use: if I set "read from XML file (array)" I should select first element.

   Just take a look at the picture! It's easyer to see than to explain.

   Thank you for interesting in my problem! Have a nice day!

graziano



0 Kudos
Message 5 of 6
(3,659 Views)
Some notices.....

    1) sorry for commenting in Italian!
 
    2) the big cluster wired to "unflattern from xml" is my array of structures.....

   3) It would be great to see in LabVIEW user manual a simple example like mine, to show the way this polymorphic vi works.

graziano
0 Kudos
Message 6 of 6
(3,649 Views)