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

AVEVA™ Plant SCADA

XMLNodeFind

  • Last UpdatedJul 18, 2023
  • 1 minute read

Use this function to select the first XML node that matches the XPath expression.

Syntax

INT XMLNodeFind(INT hDoc, STRING sQuery)

hDoc

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

sQuery

XPath Expression

Return Value

Handle of the first XML node that matches the XPath expression, or BAD HANDLE on error.

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

Example

Following example creates an XML document from local file "H:\Data\books.xml", then selects the first node that matches XPath expression "/bookstore/book/"

INT hDoc, hNode;

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

IF hDoc <> -1 THEN

hNode=XMLNodeFind(hDoc,"/bookstore/book/");

End

See Also

XML Functions

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