LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to fill *.xml template

Hi,

I have created an *.xml file form. How can I open this *.xml file by LabView and fill it's fields?

0 Kudos
Message 1 of 6
(3,304 Views)
Depends. Which version of LabVIEW do you have? If you have 8.5 or earlier, then you will need to use third-party tools to read/write the XML files if you're using your own schema (which it sounds like you're doing). Options include LabXML (free) or JKI's Easy XML (not free). If you have LabVIEW 8.6 then you can use the XML Parser VIs and functions.
0 Kudos
Message 2 of 6
(3,298 Views)

I work with LabView 8.6.

I can read the xml file, xml file's elements, but I can't replace it's values with another value. Can you help, how can I do that?

0 Kudos
Message 3 of 6
(3,287 Views)

I don't quite understand your question. The Node Value property for an XML node lets you set the value.

 

Have you taken a look at the examples that ship with LabVIEW? If you search for "xml" there's an example called "Temperature Test Data" that extracts information from an XML file, showing you how to use the XML Parser functions. 

0 Kudos
Message 4 of 6
(3,269 Views)

My *.xml file has a form:

<Header>
   <General>
   <FileInfo>
    <Name>File01.xml</Name>
    <Description>DSC00</Description>
    <DateCreated>20/06/2009 02.54.06 PM</DateCreated>
    <DateModified>27/08/2009 07.26.59 PM</DateModified>
    <Version>1.0</Version>

...


My problem is to read the file and to do changes in it. For example, I want to change the line
     <version>1.0</version>
to   
     <version>2.0</version>

There are Invoke nodes like GetElement, GetAttribute ... and I could read the values of elements. But I can't find
how to change these values.

The examples of LabView didn't help me.

 

0 Kudos
Message 5 of 6
(3,263 Views)
There's several ways you can do this, and the attached example should be able to do it. Modify as needed.
0 Kudos
Message 6 of 6
(3,252 Views)