PreviousNextIndex

START-ELEMENT( ) method

Starts an XML node based upon the name of the node in a SAX-writer object.

Return type: LOGICAL

Applies to: SAX-writer object handle

Syntax
START-ELEMENT( name [, namespace-URI ] [, SAX-attributes-handle ] ) 

name
namespace-URI
SAX-attributes-handle

Starts an XML node. This method call changes the WRITE-STATUS to SAX-WRITE-TAG.

For every call of the START-ELEMENT( )method, there must be a following corresponding call of the END-ELEMENT( ) method. All the parameter values from the two calls must match for the methods to correspond.

If namespace-URI is present, then the prefix will be resolved in the following order:

  1. The method attempts to extract the namespace from the name.
  2. The method attempts to extract the namespace from a previously declared namespace.
  3. The method attempts to generate the default namespace.

If the name contains a prefix, namespace-URI is present, and this is the first instance of the namespace-URI, then the namespace is added to the element. This technique is equivalent to calling the DECLARE-NAMESPACE( ) method.

If only the name is present and it contains a prefix, then the SAX-writer attempts to resolve the prefix to a namespace.

If the SAX-attributes-handle is supplied, then attributes are written out after the name of the element, in the order that they are indexed in the SAX-attributes object. If they contain namespace information, then that information is handled as if the attribute were added using the INSERT-ATTRIBUTE( ) method.

If the STRICT attribute is TRUE, the FRAGMENT attribute is FALSE, and the call 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 call would create the root node, then the name used for the DTD declaration must match the name of the root node or the method fails.

See also: END-ELEMENT( ) method


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex