WRITE-ENTITY-REF( ) method
- Last Updated: February 11, 2026
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
Adds an entity reference to the XML document represented by a SAX-writer object.
Return type: LOGICAL
Applies to: SAX-writer object handle
Syntax
|
- value
- A CHARACTER or LONGCHAR expression evaluating to the value of the entity reference.
Call this method to add an entity reference to the XML document. You can add entity references at any time during the write.
This method does not change the WRITE-STATUS attribute.
You cannot add entity
references using the WRITE-CHARACTERS method because the entity
references contain the escapable character "&".
For example, if you add the entity reference fromname with
the WRITE-CHARACTERS method, this call, xmlwh:WRITE-CHARACTERS("&fromname;"), produces
the invalid value &fromname; in the XML
document. However, you can add entity references using the WRITE-FRAGMENT
method, since it does not escape special characters.
Do not
include the special characters when inserting the reference, only
the reference value. For example, xmlwh:entity-reference("fromname") produces &fromname; in
the XML document.