Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #8723

Re: javax.xml.transform.Transformer and HTML entities

From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: javax.xml.transform.Transformer and HTML entities
Date 2011-10-11 19:15 -0400
Organization A noiseless patient Spider
Message-ID <j72ika$cun$1@dont-email.me> (permalink)
References <4e94c9cd$0$29390$426a74cc@news.free.fr>

Show all headers | View raw


On 10/11/2011 06:57 PM, Aéris wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I have a problem with Java XML Transformer escaping.
>
> I use Transformer to create a HTML file from an DOM Document.
> But in generated HTML, all «&  » on text nodes in the document, which
> are parts of already escaped HTML entities like «&nbsp; », are
> re-escaped by Transformer.
>
> See this sample : http://pastebin.com/LfGpWMai
> Instead of expected
> 	<div>&mdash;</div>
> I get
> 	<div>&amp;mdash;</div>
>
> I search on doc and Google, but nothing found to disable escaping.
> Is there anybody to help me ?
>
> Thanks
>

I'm sorry I cannot help. I only comment that I am experiencing
the opposite problem with javax.xml.stream.EventReader. Either I
haven't figured out how to configure the reader or haven't grokked
the XML. Best of luck.


Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

javax.xml.transform.Transformer and HTML entities Aéris <aeris@imirhil.fr> - 2011-10-12 00:57 +0200
  Re: javax.xml.transform.Transformer and HTML entities Arne Vajhøj <arne@vajhoej.dk> - 2011-10-11 19:04 -0400
  Re: javax.xml.transform.Transformer and HTML entities Jeff Higgins <jeff@invalid.invalid> - 2011-10-11 19:15 -0400
  Re: javax.xml.transform.Transformer and HTML entities markspace <-@.> - 2011-10-11 17:58 -0700
    Re: javax.xml.transform.Transformer and HTML entities Arne Vajhøj <arne@vajhoej.dk> - 2011-10-11 21:14 -0400

csiph-web