Attributes

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
Return value
Name | Type |
---|---|
Attributes | SXmlAttribute |
Inputs
Name | Type |
---|---|
n | SXmlNode |
/
Inputs/Outputs
Name | Type |
---|---|
name | STRING |
Sample call:
xmlMachine1Attribute := fbXml.Attribute(xmlMachine1, 'Type');