Cicode Programming Reference > Cicode Function Categories > XML Functions > XMLSave

XMLSave

Use this function to save XML document on disk.

Syntax

INT XMLSave(INT hDoc, STRING sFilePath)

hDoc

Handle of the XML document. Returned by XMLCreate or XMLOpen.

sQuery

Absolute path of the disk file that XML document is written to.

Return Value

0 (zero) if successful, otherwise an error code is returned.

Related Functions

XMLClose, XMLCreate, XMLGetAttribute, XMLGetAttributeCount, XMLGetAttributeName, XMLGetAttributeValue, XMLGetChild, XMLGetChildCount, XMLGetParent, XMLGetRoot, XMLNodeAddChild, XMLNodeFind, XMLNodeGetName, XMLNodeGetValue, XMLNodeRemove, XMLNodeSetValue, XMLOpen, XMLSetAttribute

Example

 

INT hDoc, hNode;
hdoc=XMLOpen("H:\Data_Backup\books.xml");
IF hDoc <> -1 THEN
	XMLSave(hDoc, "H:\Data_Backup\books.xml");
END
			

See Also

XML Functions

Published June 2018