FirstNodeByPath

FirstNodeByPath 1:

This method navigates through an XML document using a path that was transferred to the method. The path and the start node are transferred to the method as input parameters. The path is specified with "/" as separator. The method returns a reference to the XML node that was found.

Syntax

METHOD FirstNodeByPath : SXmlNode
VAR_INPUT
  n    : SXmlNode;
  path : STRING;
END_VAR

FirstNodeByPath 2: Return value

Name

Type

FirstNodeByPath

SXmlNode

FirstNodeByPath 3: Inputs

Name

Type

n

SXmlNode

path

STRING

Sample call:

xmlFoundNode := fbXml.FirstNodeByPath(xmlStartNode, 'Level1/Level2/Level3');