04-03-2012 08:35 AM
Hello All,
I have many things in xml file and i need to convert it into array of cluster so i caan use those values for my futher need. Can someone guide me on the same.
Thanks in advance.
pals
04-03-2012 09:03 AM
What generated the XML? If you used flatten to XML on the cluster then it is easy.
Otherwise you should take a look at the XML parsing examples that ship with LabVIEW.
04-03-2012 09:18 AM
Also you can try EasyXML from JKI.
04-03-2012 09:21 AM
Hi,
Thanks but i cant use EasyXML. I have lots of different data and which i need to convert into Array so i can use in the loop one-by-one.
Thanks a lot.
04-03-2012 12:54 PM
@Sim5 wrote:
Hi,
Thanks but i cant use EasyXML. I have lots of different data and which i need to convert into Array so i can use in the loop one-by-one.
That's a non-sequitor. Using EasyXML does not prevent you from doing that. What's important is what schema did you use. Steve asked what generated the XML file, but you never answered the question. If the file was generated from LabVIEW using the Flatten to XML function, then the LabVIEW schema would have been used. In this case, the Unflatten From XML will work quite well, as Steve's example shows. If you are using a custom schema then you need to read the XML file yourself and navigate the DOM based on the schema. You can choose to do this using the XML Parser functions in LabVIEW, or you can choose to use EasyXML. Examples on using the XML Parser functions ship with LabVIEW.
04-04-2012 03:22 AM
Hi,
I already have xml file which i am trying to read using this code... But its not working....
Thanks!!!!!!
04-04-2012 03:26 AM
And xml file is not created by Labview.
04-04-2012 07:33 AM
Please read the documentation. The VIs you are trying to use only work with XML files that use the LabVIEW schema. Since your XML file does not use that schema, you cannot use those VIs. As I said, you have the following choices:
04-04-2012 09:09 AM
HI,
Easy lab is not there in 8.5.1 and Lab XML is another toolkit which i can't buy. I have to do this project using given things so i can't use both.
Is there any other way. If so and then i would be glad as i don't know much about xml in labview.
Thanks!!!!!
04-04-2012 09:21 AM
I also don't know if the XML parsing functionality existed in 8.5. Do you have this in your pallette? If so go to help/find examples and look for Load Test Configuration.vi. That should get you started.