ChildByAttribute

ChildByAttribute 1:

This method is used to navigate through the DOM. It returns a reference to a child element in the XML document. The start node and the name and value of the attribute are transferred to the method as input parameters.

Syntax

METHOD ChildByAttribute : SXmlNode
VAR_INPUT
  n     : SXmlNode;
END_VAR
VAR_IN_OUT CONSTANT
  attr  : STRING;
  value : STRING;
END_VAR

ChildByAttribute 2: Return value

Name

Type

ChildByAttribute

SXmlNode

ChildByAttribute 3: Inputs

Name

Type

n

SXmlNode

ChildByAttribute 4:/ChildByAttribute 5: Inputs/Outputs

Name

Type

attr

STRING

value

STRING

Sample call:

xmlMachine1 := fbXml.ChildByAttribute(xmlMachines, 'Type', '1');