WRITE-DATA-ELEMENT( ) method
Creates a complete XML node in a SAX-writer object.
Return type: LOGICAL
Applies to: SAX-writer object handle
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 andnamespace-URI
is used, and this call is the first instance of thenamespace-URI,
then the namespace will be added to the element. This is equivalent to calling the DECLARE-NAMESPACE method. If only thename
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
andnamespace-URI
are the parameters of START-ELEMENT and END-ELEMENT, andchardata
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 thename
of the root node or the method fails.See also: DECLARE-NAMESPACE( ) method
OpenEdge Release 10.2B
|