Set the root element of an XML document

WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
status = %XML_DOC_SETROOT(document, element)

Return value


XML_SUCCESS if the root element is set successfully.



The XML document instance for which to set the root element. (XML_DOC_TYPE)


The XML element instance to set as the root. (XML_ELEM_TYPE)


An XML document should contain only one root element, and that element may appear only once in the document. The remainder of the page contents are contained inside this element.

Note that %XML_DOC_CREATE automatically creates a root element when it creates a new XML document.

This function is defined as ^VAL.


xcall xml_doc_setRoot(document, root)

For a more detailed example, see Example of assembling XML.