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

XMLCreate

Use this function to create a new XML document in memory.

Syntax

INT XMLCreate(STRING sRootElement, STRING sNamespace = "")

sRootElement:

Root element of the XML document.

sNamespace:

Optional. Namespace URI of root element.

Return Value

Handle of XML document, or returns -1 on error

Related Functions

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

Example

Following example creates an empty XML document and sets root element to shapes and namespace of root element to "http://schneider-electric.com/shapes/v1".

 

INT hDoc=XMLCreate("shapes","http://schneider-electric.com/shapes/v1");
		

See Also

XML Functions

Published June 2018