Retrieve data from a SAX-attributes object
- Last Updated: June 7, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
To get information about each attribute from a SAX-attributes object,
use the GET-xxx methods. These
methods let your application get the SAX-attributes data in two
different ways:
- You can traverse the list, getting each attribute's data
in turn by using the
GET-xxx-BY-INDEXmethods - You can use an attribute's name to get its data
There are six facts you can get about each attribute, although
three are variations on the attribute name. Each GET-xxx method
retrieves one fact. The following table describes the six facts
and the function of the GET-xxx methods.
| To get this information on an attribute . . . | Use these methods . . . |
|---|---|
| Its position on the list |
|
| Its namespace URI, if namespace information is available |
|
| Its local name, if namespace processing is available |
|
| Its Qualified name (qName) |
|
| Its XML attribute type (declared in the DTD or XML Schema) |
|
| Its value |
|
If the parser is processing namespaces—that is, if SAX-reader
object SUPPRESS-NAMESPACE-PROCESSING attribute
is set to NO (the default)—each attribute that
has a namespace prefix will have non-empty URI, localName,
and qName data. An attribute that has the noNamespace prefix
will have an empty URI, but its localName and qName will
have values.
If the parser is not processing namespaces, each attribute will
only have a qName. In all cases, the qName will
be exactly what appears in the XML document.