Write to XML File(array) VI
- Updated2025-07-30
- 3 minute(s) read
Writes a text string of XML data with accompanying header tags to a text file. Wire data to the XML Input input to determine the polymorphic instance to use or manually select the instance. All XML data must follow the standard LabVIEW XML schema.

Inputs/Outputs
XML File Path
—
XML File Path is the path of the file to which the VI writes data. The filename must have a .xml extension. When you specify an empty path, a dialog box prompts the user to specify an XML file.
XML Input
—
XML Input allows you to write multiple nodes of XML data to an XML file.
XML Encoding
—
XML Encoding specifies the encoding scheme for the XML file. LabVIEW supports ANSI and Multibyte encoding schemes.
error in (no error)
—
error in describes error conditions that occur before this node runs. This input provides standard error in functionality.
Standalone? (T)
—
Standalone? specifies the value for the standalone attribute in the XML declaration. Standalone? determines whether the document exists entirely on its own (TRUE), or depends on other files (FALSE).
XML File Path
—
XML File Path is the path and filename to which you want to write XML data. You can use this output to determine the file path that you selected through a dialog box. XML File Path has a value of <Not A Path> if you cancelled the dialog box.
XML String
—
XML String contains the XML data that the VI writes to the specified file.
error out
—
error out contains error information. This output provides standard error out functionality. |
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\File IO\XML\Flatten and Unflatten XML\Flatten and Unflatten XML.lvproj
XML File Path
—
XML Input
—
XML Encoding
—
error in (no error)
—
Standalone? (T)
—
XML File Path
—
XML String
—
error out
—