02-08-2011 09:18 AM
<?xml version="1.0" encoding="utf-8" ?>
<Machine CreatedDate="06/09/2010" MachineSN="AAAA3" HEADTYPE="green" HEADSN="Head1" LENS="LEN1" TEST="TEST1" TESTERS="10134194">
<Amp Value="18">
<TempTest Value="Head1">39</TempTest>
</Amp>
<Amp Value="20">
<TempTest Value="Head1">132</TempTest>
</Amp>
<Amp Value="22">
<TempTest Value="Head1">43</TempTest>
</Amp>
</Machine>
02-08-2011 11:06 AM
Those are called XML-attributes, I don't know about the native LabVIEW interface, but the JKI-easy XML toolkit has the ability to read and write those attributes.
Ton
02-08-2011 01:06 PM
You can also do this with the XML functions. See the example I posted in this thread: http://forums.ni.com/t5/LabVIEW/XML-Attribute/m-p/791538
02-09-2011 01:36 AM
hi,
Thank you for your help, I seemed to miss the attributes!!! It should satisfy my needs I will try it out
Thanks once again
02-09-2011 08:02 AM
Hi,
I have another question that I have not managed to do - How can I convert a bundle (graph) to XML? Is it possible to put an XML element in a for loop - will it add a new child every time? I think that I could do that if it is possible instead of converting a bundle to XML?
02-09-2011 08:29 AM
If you are using the XML Parser VIs then you need to create your own schema and you need to use the XML Parser functions to create the necessary nodes. If you use the Flatten to XML functions then these use the LabVIEW schema, and the cluster is automatically converted to XML.
As for your question regarding children, you can create the nodes any way you want. Yes, you can use a loop to create multiple children for a node. Please refer to the documentation on the XML Parser VIs if you are using them. There are also examples that ship with LabVIEW.
02-09-2011 08:43 AM
The flatten to XML is not good enough for my needs, I will take your advise and learn more about the parsers, thank you for the help