Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

XMLGetRoot

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the root element of the specified XML document.

Syntax

INT XMLGetRoot(INT hDoc)

hDoc

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

Return Value

Handle of root element, or-1 on error.

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

Example

Following example creates an XML document from local file "H:\Data\books.xml", then gets the root element.

INT hDoc, hRoot;

hDoc=XMLOpen("H:\Data\books.xml");

If hDoc <> -1 THEN

hRoot=XMLGetRoot(hDoc);

End

See Also

XML Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in