You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Roch B <ro...@gmail.com> on 2008/03/06 17:46:55 UTC

Special character issues

Hi,

I've got some trouble to customize the parsing/saving mode for XMLBeans.

For example, I parse the following basic well-formed XML file: <test>this is
a test for quotes: ", &quot; end</test>.

XMLBeans considers " and &quot; as the same entity, and when I render it, "
and &quot; are displayed either as 2 quotes (") or as 2 special character
quotes (&quot;) if I use XmlOptionCharEscapeMap. Having the distinction
between " and &quot; is very critical for my project and I don't know how to
make it work the way I want. Does anybody would have an idea please?

Thank you,

Rok

RE: Special character issues

Posted by Wing Yew Poon <wp...@bea.com>.
&quot; is a predefined entity reference in XML. It is equivalent in XML
to the " character in character data. That is the whole point of the
entity. If you want the literal "&quot;" then you should escape it as
"&amp;quot;".
- Wing Yew

________________________________

From: Roch B [mailto:rokinus@gmail.com] 
Sent: Thursday, March 06, 2008 8:47 AM
To: user@xmlbeans.apache.org
Subject: Special character issues


Hi,

I've got some trouble to customize the parsing/saving mode for XMLBeans.

For example, I parse the following basic well-formed XML file:
<test>this is a test for quotes: ", &quot; end</test>. 

XMLBeans considers " and &quot; as the same entity, and when I render
it, " and &quot; are displayed either as 2 quotes (") or as 2 special
character quotes (&quot;) if I use XmlOptionCharEscapeMap. Having the
distinction between " and &quot; is very critical for my project and I
don't know how to make it work the way I want. Does anybody would have
an idea please?

Thank you,

Rok




Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.