LabWindows/CVI

CVIXMLSaveDocument

CVIXMLStatus CVIXMLSaveDocument (CVIXMLDocument document, int format, char *path);

Purpose

Saves an XML document.

Parameters

Input
Name Type Description
document CVIXMLDocument The document handle must be a valid CVIXMLDocument.
format int Choose whether to format the document.

Specify a nonzero value or select Yes in the function panel to insert line breaks between elements.

Specify 0 or select No in the function panel if you do not want to format the document.

Note  Saving XML documents with the format option enabled may cause problems with certain kinds of XML layout and in certain XML applications. National Instruments recommends that you save the XML document without formatting, unless you are sure that formatting causes no problems in your applications.
path char * The pathname of the XML document to save. If it is NULL, the pathname used with CVIXMLLoadDocument is used. If there is not an existing pathname, an error is returned.

Return Value

Name Type Description
status CVIXMLStatus Indicates whether the function was successful.

A zero indicates success.

You can call CVIXMLGetErrorString to obtain textual descriptions of error codes. Among the more commonly encountered errors are:

E_OUTOFMEMORY Out of memory.
E_INVALIDARG Invalid argument to a function.

Additional Information

Library: CVIXML

Include file: toolbox\cvixml.h

LabWindows/CVI compatibility: LabWindows/CVI 7.0 and later

Example

Refer to toolbox\XMLSample.cws for an example of using the CVIXMLSaveDocument function.

Log in to get a better experience