CopyNodeText

CopyNodeText 1:

This method reads the value of an XML node and writes it to a variable of data type String. The XML node as well as the target variable and the length to be written are passed to the method as input parameters. The method returns the actual size.

Syntax

METHOD CopyNodeText : UDINT
VAR_INPUT
  n    : SXmlNode;
END_VAR
VAR_IN_OUT CONSTANT
  sXml : STRING;
END_VAR
VAR_INPUT
  nXml : UDINT;
END_VAR

CopyNodeText 2: Return value

Name

Type

CopyNodeText

UDINT

CopyNodeText 3: Inputs

Name

Type

n

SXmlNode

nXml

UDINT

CopyNodeText 4:/CopyNodeText 5: Inputs/Outputs

Name

Type

sXml

STRING

Sample call:

nLength := fbXml.CopyNodeText(xmlNode, sTarget, SIZEOF(sTarget));