You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Mihai Matei <mi...@yahoo.com> on 2007/07/03 18:07:26 UTC

entity characters translation

Hi all,

Quick question and would appreciate a quick answer: does Xerces have a capability to translate strings that contain "entity characters" (e.g. &lt; &gt; ) back to their proper form?

That is, if I have an document, in which all "<" are replaced with "&lt;" (due to other processing that takes place before the XML document gets to me), can I load it into Xerces, or do I have to convert it first using some string replacements? I think the latter is the case, but I'm asking just in case.

Thanks.


       
____________________________________________________________________________________
Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: mail, news, photos & more. 
http://mobile.yahoo.com/go?refer=1GNXIC

Re: entity characters translation

Posted by Alberto Massari <am...@datadirect.com>.
Hi,
if the &gt; and &lt; have been written in order to have well-formed 
XML, Xerces will take care of converting them. For instance, if you have

<root>
         <data>A &gt; B</data>
</root>

Xerces will report the string "A > B".

Alberto

At 09.07 03/07/2007 -0700, Mihai Matei wrote:
>Hi all,
>
>Quick question and would appreciate a quick answer: does Xerces have 
>a capability to translate strings that contain "entity characters" 
>(e.g. &lt; &gt; ) back to their proper form?
>
>That is, if I have an document, in which all "<" are replaced with 
>"&lt;" (due to other processing that takes place before the XML 
>document gets to me), can I load it into Xerces, or do I have to 
>convert it first using some string replacements? I think the latter 
>is the case, but I'm asking just in case.
>
>Thanks.
>
>
>
>____________________________________________________________________________________
>Take the Internet to Go: Yahoo!Go puts the Internet in your pocket: 
>mail, news, photos & more.
>http://mobile.yahoo.com/go?refer=1GNXIC