PreviousNextIndex

WRITE-ENTITY-REF( ) method

Adds an entity reference to the XML document represented by a SAX-writer object.

Return type: LOGICAL

Applies to: SAX-writer object handle

Syntax
WRITE-ENTITY-REF ( value ) 

value

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.

See also: WRITE-CHARACTERS( ) method, WRITE-FRAGMENT( ) method


OpenEdge Release 10.2B
Copyright © 2009 Progress Software Corporation
PreviousNextIndex