CopyNodeXml

CopyNodeXml 1:

This method reads the XML structure 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 CopyNodeXml : UDINT
VAR_INPUT
  a    : SXmlNode;
END_VAR
VAR_IN_OUT CONSTANT
  sXml : STRING;
END_VAR
VAR_INPUT
  nXml : UDINT;
END_VAR

CopyNodeXml 2: Return value

Name

Type

CopyNodeXml

UDINT

CopyNodeXml 3: Inputs

Name

Type

a

SXmlNode

nXml

UDINT

CopyNodeXml 4:/CopyNodeXml 5: Inputs/Outputs

Name

Type

sXml

STRING

Sample call:

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