Jump to content

Extensible Capability of XML Files


amaggs145

Recommended Posts

One of my colleagues that I work with uses Perl to read & write XML files. One on the features that he likes most about this is that the XML files are extensible in the sense that more information can be added to the files later without breaking previous code that was used to write and read the original version of the files before additional information was added.

 

I was wondering if there is some tip or trick to having this same capability with the VI's available in the XML toolkit. One way that I was thinking of was instead of using "Easy Read XML File.vi" directly I could read the all the data within the file first with LAbVIEW's file read VI's, then do some processing on the text to extract only necessary data and then use "Easy Parse XML.vi" on select portions of the file.

 

There may be some other method that would require less custom coding for each file. Thanks for any input.

 

Regards,

Anthony

Link to comment
Share on other sites

On trick you can use, is to use a string data type in LabVIEW for an XML element (I think you also need to name the string with an " #xml" suffix). The result is that the raw XML data will be read into/from the string and then can be processed in a separate step. This is especially helpful if elements (having the same name) come in a few different flavors (sub-element types and structure).

Link to comment
Share on other sites

  • 4 years later...

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.