XMLCreateNode
(Engine-Level Function)
Description: | Creates a new XMLNode. |
Returns: | An XMLNode. |
Usage: | Script Only. |
Function Groups: | XML |
Related to: | XMLParse | XMLProcessor | XMLAddSchema | XMLWrite | XMLCloneNode | XMLDeleteMember | XMLGetNode | GetXMLNodeArray |
Format: | XMLCreateNode([Contents, AttributesDictionary, Namespace, MembersDictionary]) |
Parameters: |
Contents |
A text value to be placed in the #content member of the XMLNode. |
AttributesDictionary |
A dictionary containing attributes for the XMLNode |
Namespace |
A text value containing the namespace for the XMLNode. |
MembersDictionary |
A dictionary containing additional members to be added to the XMLnode. |
Comments: | If the optional member dictionary parameter is supplied, any additional members will be added to the XMLNode in the same order that they were added to the dictionary. If the #comment or #cdata members require values, they can be assigned after the node has been created. |
Example:
AttribsDict = Dictionary(0); AttribsDict["id"] = 42; MembersDict = Dictionary(0); MembersDict["Item1"] = XMLCreateNode("01234567890"); MyNode = XMLCreateNode("abc", AttribsDict, https://vtscada.com/XML", MembersDict);
Creates the following XMLNode: