Jump to content
Chuck

Append to an XML file

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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