Creates an XML node from a string that contains a valid XML representation of an XML node.
The string can also contain complex nodes with child nodes, e.g.: <cars><car>BMW</car><car>Volvo</car></cars>
XmlAPI.bdh
XmlCreateNodeFromXml( in sXmlString : string ): boolean;
true if successful
false otherwise
Parameter | Description |
---|---|
sXmlString | Valid XML string |
dcltrans transaction TMain var hDocument, hResult, hNewNode : number; begin hDocument := XmlCreateDocumentFromXml( "<root><child1 attr1='avalue1'>childvalue1</child1>" "<child2 attr1= 'avalue2'>childvalue2</child2></root>"); hNewNode := XmlCreateNodeFromXml("<child3 attr1='avalue3'>childvalue3</child3>"); hResult := XmlSelectSingleNode(hDocument, "/root"); XmlAppendChild (hResult, hNewNode); end TMain;