From: Larner, Ross S [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 10:41 AM
To: [email protected]
Subject: RE: passing xml as a string to XML Beans
From: Jacob Danner [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 10:22 AM
To: [email protected]
Subject: RE: passing xml as a string to XML Beans
From: Larner, Ross S [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 08, 2006 9:51 AM
To: [email protected]
Subject: passing xml as a string to XML Beans
_______________________________________________________________________ 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.--
this email delivered by hermes
_______________________________________________________________________ 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.
--- Begin Message --- Title: RE: Parsing of data containing entity referencesActually there is a JIRA talking about this:
http://issues.apache.org/jira/browse/XMLBEANS-176 (whose priority I have
just updated).
I would want to point out though that "conversion" is not the right way
to think about it, since XmlBeans doesn't 'remember' whether originally
the text was encoded using a CDATA or not (this is not part of the XML
infoset), so the problem the code is trying to solve is: given a String
containing characters that need 'special' handling, should CDATA be used
or character references? (both being equivalent, from an XML point of
view)
Currently, the answer is this: if the length of the string to be encoded
is at least 32 characters _and_ there are at least 5 characters that
need encoding _and_ at least 1% of the characters need encoding, then a
CDATA is used. (see org.apache.xmlbeans.impl.store.Saver.java:1282)
Radu
-----Original Message-----
From: Coolbergen, Christopher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 07, 2006 12:14 AM
To: [email protected]
Subject: Parsing of data containing entity references
> Hi,
>
> I have an XML document with an element containing a large amount of
> text that includes entity references eg:
>
> <description>There are 2 ADR'S</description>
>
> Whenever I parse the XML as an InputStream it places the text within a
> ![CDATA[ section and resolves the entity references thus:
>
> <description>![CDATA[ There are 2 ADR'S]]</description>
>
> I do not wish this to happen, and would like the string to remain as
> it originally was with the entity references before being parsed.
> Is there some setting that I can use to stop the conversion to CDATA
> etc happening?
>
> Thanks in advance,
>
> Chris
------------------------------------------------------------------------
------
This message is intended only for the personal and confidential use of
the designated recipient(s) named above. If you are not the intended
recipient of this message you are hereby notified that any review,
dissemination, distribution or copying of this message is strictly
prohibited. This communication is for information purposes only and
should not be regarded as an offer to sell or as a solicitation of an
offer to buy any financial product, an official confirmation of any
transaction, or as an official statement of Lehman Brothers. Email
transmission cannot be guaranteed to be secure or error-free.
Therefore, we do not represent that this information is complete or
accurate and it should not be relied upon as such. All information is
subject to change without notice.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
_______________________________________________________________________
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--- End Message ---
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

