AppendChild

This method inserts a new node below an existing node. The value of the new node is of the data type STRING. The name and the value of the new node as well as a reference to the existing node are transferred to the method as input parameters. The method returns a reference to the newly added node. The input parameter cdata indicates whether the value of the node is to be encapsulated in a CDATA function block, so that certain special characters such as "<" and ">" are allowed as values.
Syntax
METHOD AppendChild : SXmlNode
VAR_INPUT
n : SXmlNode;
END_VAR
VAR_IN_OUT CONSTANT
name : STRING;
value : STRING;
END_VAR
VAR_INPUT
cdata : BOOL;
END_VAR
Return value
Name | Type |
---|---|
AppendChild | SXmlNode |
Inputs
Name | Type |
---|---|
n | SXmlNode |
cdata | BOOL |
/
Inputs/Outputs
Name | Type |
---|---|
name | STRING |
value | STRING |
Sample call:
xmlNewNode := fbXml.AppendChild(xmlExisting, 'Controller', 'CX5120', FALSE);