Creates a complete XML node in a SAX-writer object.
Return type: LOGICAL
Applies to: SAX-writer object handle
WRITE-DATA-ELEMENT ( name , { chardata | longchar } [ , namespace-URI ] [ , SAX-attributes-handle ] ) |
Creates a complete XML node. This method call sets the WRITE-STATUS to SAX-WRITE-ELEMENT.
If you use namespace-URI, then the prefix is resolved in the following order:
If name contains a prefix and namespace-URI is used, and this call is the first instance of the namespace-URI, then the namespace will be added to the element. This is equivalent to calling the DECLARE-NAMESPACE method. If only the name is used and it contains a prefix, then the SAX-writer attempts to resolve the prefix to a namespace.
This technique is logically equivalent to calling the START-ELEMENT, WRITE-CHARACTERS, and END-ELEMENT methods where name and namespace-URI are the parameters of START-ELEMENT and END-ELEMENT, and chardata is the parameter of WRITE-CHARACTERS.
Note that attributes and namespaces cannot be added after you call this method. If you need to add either to the element, then use the START-ELEMENT method.
If the STRICT attribute is TRUE, the FRAGMENT attribute is FALSE, and the invocation would result in more than one document-level element (that is, root node), then the method fails. Also, if STRICT is TRUE, an external DTD has been declared, and the invocation would create the root node, the name used for the DTD declaration must match the name of the root node or the method fails.