[jdom-interest] Embedding HTML in XML

Richard Waters rwaters at marimba.com
Mon Jun 26 14:14:16 PDT 2000

> But converting an 
> HTML fragment
> to XML (a la JDOM) is difficult because standard HTML isn't 
> well-formed
> XML.  What are you going to do if someone writes in 
> this is my text <p>
> If you store that in XML, the document will be malformed.

that's why i was wondering if i could get around having to actually store
those html tags as xml. what would be nice is if the <i> (or whatever) just
keeps getting passed through untouched until the browser interprets it as

1. jdom doesn't turn the <i> into &lt;i&gt;, but doesn't treat it as an xml
element either
2. xalan and my xslt stylesheet ignore the <i>, and just pass it through to
the final html document, just like any other text
3. the browser renders the html, but sees the <i> and treats it like an html

i can't get that to work, though, can i? i wondered about putting the text
with the <i> in a CDATA section or something, but will jdom even let me do
that (i.e., ever not turn <> into &lt;&gt;)? 


More information about the jdom-interest mailing list