Characters
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Syntax
Invoked when the XML parser detects character data.
|
- charData
- A
MEMPTRorLONGCHARthat contains a chunk of character data. - numChars
- The number of characters contained in the
MEMPTR.Note: If a character requires more than one byte to encode, the value ofnumCharsmight not match the value returned byMEMPTR:GETSIZE( ).
The
parser calls this method to report each chunk of character data.
It might report contiguous character data in one chunk, or split
it into several chunks. If validation is enabled, whitespace is
reported by the IgnorableWhitespace callback.
Although
this callback is intended to be called by the parser, the application can
call Characters directly. Whoever calls Characters must
free the charData MEMPTR. When
ABL calls Characters, the AVM is responsible for
freeing the charData MEMPTR (although
if the application frees it, no harm results). If the application
calls Characters, the application is responsible
for freeing the charData MEMPTR.
To
copy the charData MEMPTR such that the memory used
by the copy is completely separate from the memory used by the original,
use ABL assignment, which performs a deep copy. The following fragment
demonstrates this:
|
For more information on ABL assignment, see ABL Reference.