The addText method always escapes characters like '&' and '<' otherwise
the output XML would not be well-formed.
Regards,
Edwin
On 7/25/05, Heitor Barbieri <[EMAIL PROTECTED]> wrote:
>
> Why do I get different outputs for the 'root' element in the following
> program ? How can I get
> the same output using partText ?
>
>
> Element root1 = DocumentHelper.createElement( "root" ).addText(
> "≤" );
> Document document =
> DocumentHelper.parseText("<root>≤</root>");
>
> System.out.println(root1.asXML());
> System.out.println(document.asXML());
>
> ---------------------------------------------------------------------------------------------------
> Output:
>
> <root>&#8804;</root>
> <?xml version="1.0" encoding="UTF-8"?>
> <root>?</root>
>
> Thanks in advance
>
> Heitor
>
>
> -------------------------------------------------------
> SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
> from IBM. Find simple to follow Roadmaps, straightforward articles,
> informative Webcasts and more! Get everything you need to get up to
> speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
> _______________________________________________
> dom4j-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
>
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
dom4j-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dom4j-user