Attributes

Attributes 1:

This method can be used to read the attribute of a given XML node. The XML node and the name of the attribute are transferred to the method as input parameters. After the method has been called, further methods have to be called, for example to read the value of the attribute, e.g. AttributeAsInt().

Syntax

METHOD Attribute : SXmlAttribute
VAR_INPUT
  n    : SXmlNode;
END_VAR
VAR_IN_OUT CONSTANT
  name : STRING;
END_VAR

Attributes 2: Return value

Name

Type

Attributes

SXmlAttribute

Attributes 3: Inputs

Name

Type

n

SXmlNode

Attributes 4:/Attributes 5: Inputs/Outputs

Name

Type

name

STRING

Sample call:

xmlMachine1Attribute := fbXml.Attribute(xmlMachine1, 'Type');