UPDATE-ATTRIBUTE( ) method
- Last Updated: July 20, 2021
- 2 minute read
- OpenEdge
- Version 12.2
- Documentation
Finds an attribute and updates its value within a SAX-attributes object.
Return type: LOGICAL
Applies to: SAX-attributes object handle
Syntax
|
- attribute-name
- A CHARACTER expression evaluating to the fully qualified or unqualified name of the attribute.
- index
- An integer expression evaluating to the position of the attribute in
the attribute list. The first attribute has an index of 1. When using index, namespaceURI must
be the Unknown value (
?), an empty string, or not supplied. Otherwise, an invalid argument error will be raised. - attribute-value
- A CHARACTER expression evaluating to the value of the attribute.
- namespaceURI
- A CHARACTER expression evaluating to:
- The URI of the attribute
- A zero-length string
- The Unknown value (
?) if the attribute doesn't contain a namespace
Call this method to update an attribute value within a SAX-attributes object. For example, if an XML element obtained from the SAX-reader object need to be modified before being used to write the XML element to a document being written by the SAX-writer object, use this method to find and update the attributes.
The index values of attributes left in the list is then updated to reflect the removed attribute. The NUM-ITEMS value will also be decremented to reflect the removed attribute.
If the method fails to find a match, because the name is not found or the index position is invalid, then the method will return FALSE.
If using an attribute-name, the method updates the first match it finds in the list.
The following are examples:
|