I see what you mean. I'm actually not interested in exactly how the sequence is represented - whether it's &amp;, &#38;, &#x26;, or <![CDATA[&]]> - but I do need to know that a special character has been found.

&amp; might be treated as being the same as &#38;, but these are both distinct from ordinary text. When the parser encounters the string "foobar", it returns a String containing "foobar", but when it finds the string "&amp;" it returns a string containing "&".

What I need is to be notified that this tranlslation has occurred, or that it is about to occur.

Is this possible?


[EMAIL PROTECTED] wrote:

As far as XML is concerned, numeric character references are identical to the characters they represent. The XML APIs shouldn't make any distinction.

For implementation reasons, you *may* find that SAX delivers these as separate characters() events. But that is not guaranteed.

No XML application should ever care whether your document contains &amp;, &#38;, &#x26;, or <![CDATA[&]]>... so I'd suggest that if you think you need this information, your design is probably broken and should be reconsidered.

______________________________________
"... Three things see no end: A loop with exit code done wrong,
A semaphore untested, And the change that comes along. ..."
-- "Threes" Rev 1.1 - Duane Elms / Leslie Fish (http://www.ovff.org/pegasus/songs/threes-rev-11.html)
------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.3/1390 - Release Date: 21/04/2008 16:23


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to