Try OpenEdge Now
skip to main content
ABL Reference
Handle Reference : SAX-attributes object handle
 

SAX-attributes object handle

Contains the list of attribute names, values, and optional namespaces of an XML element for use in the SAX-reader or SAX-writer object. The purpose of the object is to hold values needed by the SAX parser to set the attribute values of a new XML element as it reads the element into a SAX-reader object or prepares an XML object for writing in a SAX-writer object.
SAX-attributes objects used by the SAX-reader object are automatically created, populated, and deleted in the context of the startElement callback procedure. In that context, a programmer may use the methods and attributes of the object to modify it. However, if the programmer wants to use the contents of this SAX-attributes object outside of the short scope of the startElement callback, then the programmer must create another SAX-attributes object outside this scope and copy the SAX-reader's SAX-attributes object to the new object.
A SAX-attributes object is an optional parameter for SAX-writer methods that create new XML elements. In this context, a programmer creates a new SAX-attributes object with the CREATE SAX-ATTRIBUTES statement. Typically, a programmer populates the object by using the COPY-SAX-ATTRIBUTES method to save the contents of an automatically created SAX-attributes object. A programmer can also use the other attributes and methods to build up the attributes list from scratch. Either way, once the SAX-attributes object is populated, it can be used as an optional parameter on the START-ELEMENT( ) method, WRITE-DATA-ELEMENT( ) method, or the WRITE-EMPTY-ELEMENT( ) method of the SAX-writer object.
You must explicitly deleted all SAX-attributes objects created with the CREATE SAX-ATTRIBUTES statement.

Syntax

SAX-attributes-handle [ :attribute | :method ]
SAX-attributes-handle
A variable of type HANDLE.
attribute
An attribute of the SAX-attributes object.
method
A method of the SAX-attributes object.

Attributes

Methods

See also

CREATE SAX-READER statement, CREATE SAX-WRITER statement, SAX-reader object handle, SAX-writer object handle