To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI populates the data fields of a class and then flattens the object to an XML string and writes the XML string to a file.
Description
Once a LabVIEW class has been instantiated as an object that object has a set of data associated with it. That data can be flattened to an XML string and then written to a file. This example demonstrates the ability to write class data to disk for data storage purposes. See here for an example on how to read the class data back into LabVIEW after it has been written to disk.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Does this handle escape characters?
Not sure what you mean by 'handle'. You may need to right click your string control and change the display mode to " '/' Display Codes " to get the behavior you are looking for. Reading up on what LabVIEW means by flatten when it Flattens To XML may also answer your question.
Backslash ('\') Codes Display
http://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/backslash_codes_display/
Flattened Data
http://zone.ni.com/reference/en-XX/help/371361J-01/lvconcepts/flattened_data/