CreateElementNode - cXMLDOMDocumentFragment

Creates an XML Element node

Type: Function

Return Data Type: Handle

Parameters: String sTagName String sValue

ParameterDescription
sTagNameThe element tag name
sValueThe element's value


Return Value

If successful, the function returns an object handle for the newly created node. If zero is returned, the operation failed. If a node is returned, it is your responsibility to eventually destroy the object (e.g. Send Destroy of hoMyCreatedNode).


Syntax
Function CreateElementNode String sTagName String sValue Returns Handle

Call: Get CreateElementNode sTagName sValue to HandleVariable


Description

CreateElementNode creates an node object for the element type. This function creates an XML node but does not add it to the XML document. Nodes can be created and appended in a single step using the Add... messages.

Note: All XML objects created using any of the CreateXxxxx methods will create the DataFlex object as a child of the main document node (the cXmlDomDocumentObject). The actual hierarchy of your XML document has nothing to do with this object placement. The messages AppendNode, InsertBeforeNode and CloneNode determine placement of an XML node object within the document, where the object receiving the message will become the parent node.