Jump to content

Append to an XML file


Chuck

Recommended Posts

Hello

 

I need to append additional clusters (of the same type) to an existing XML file. In a previous topic you suggested this might be a future upgrade.

 

(http://forums.jki.net/topic/767-error-10-in-writing-to-xml-file/page__p__1350__hl__append__fromsearch__1#entry1350)

 

Has this upgrade been implemented yet? If not can you suggest a way I might append to an XML file?

 

Thanks in advance

Link to comment
Share on other sites

  • 2 weeks later...

Chuck,

 

The feature is not yet available in the EasyXML Tool.

 

Attached is a VI (LabVIEW 8.2 and above) to demonstrate one possible way for you to be able to append the XML data to an existing XML file.

 

If the file is being created, I use the "Easy Write XML File" function. This ensures that the XML header gets recorded in the file.

 

On subsequent run of this VI, you read the file, generate XML string using "Easy Generate XML" function, append to the read file data and save it back to the same file.

 

I am using "File Exists" function in the code. It is part of OpenG File Toolkit. So, you will have to install the OpenG Toolkit using VIPM in order to be able to run the attached VI.

 

Hopefully this will help.

 

Thank you.

XML File Append.vi

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.