AddElement - cXMLDOMDocumentFragment

Creates a new node and append it to the list

Type: Procedure

Parameters: String sTagName String sValue

ParameterDescription
sTagNameThe name of the Element Tag
sValueValue of the element


Syntax
Procedure AddElement String sTagName String sValue

Call: Send AddElement sTagName sValue


Description

AddElement is not namespace aware and only works reliably for attributes with no namespaces and no prefixes. You should use AddElementNS in its place.

AddElement creates a new node and append it to the list. When used as a procedure, the object is destroyed. This procedure adds the node but does not return an object. Only elements usually have children (which is why there is also an AddElement function).

Sample

This sample creates a a new node element and returns a handle to the element.

Send AddElement of hoRoot "Customer" sName 


Note:If for any reason the node cannot be added to the document, an error will be generated.