<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.0.10">
</HEAD>
<BODY>
You can use CDATA blocks to prevent interpretation of XML special characters such as &quot;&lt;&quot;, &quot;&gt;&quot; and &quot;&amp;&quot; (this avoids having to explictly encode these characters). When outputting the stuff you would have to prevent the CDATA markup itself from being written out, but just its content. That way the output would contain the required markup.<BR>
<BR>
A better approach would be to use &quot;HTML Tidy&quot; to convert &quot;standard HTML&quot; (SGML) to XHTML (XML) before you use it.<BR>
<BR>
See <A HREF="http://tidy.sourceforge.net/">http://tidy.sourceforge.net/</A>.<BR>
<BR>
Phil :n)<BR>
<BR>
On Thu, 2004-04-22 at 11:09, Eric VERGNAUD wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE><FONT COLOR="#737373"><I>le 22/04/04 11:41, Phil Weighill-Smith &#224; phil.weighill-smith@volantis.com a
&#233;crit&nbsp;:

&gt; Can you not write XHTML instead?

Believe me, I would if I could. But I'm not the writer. The HTML is written
by end users, stored in my app, and sent to other apps on which I have no
control.

&gt; A common way around browser
&gt; incompatibility between HTML (SGML) and XHTML (XML) is to ensure that
&gt; there is a space before the &quot;/&gt;&quot;, e.g. &quot;&lt;br&gt;&quot; is written as &quot;&lt;br /&gt;&quot;.
&gt; This works in most browsers.

But I also need to support &lt;b&gt;Hello&lt;/b&gt;, where both tags must be part of the
text value.

Currently I convert the &quot;&lt;&quot; to &quot;&amp;lt;&quot; and &quot;&gt;&quot; to &quot;&amp;gt;&quot;. I copied this
method from Adobe's xmp format, but I find it rather heavy, and I don't know
if it's official. 

Eric

_______________________________________________
To control your jdom-interest membership:</FONT>
<A HREF="http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com"><U>http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com</U></I></A></PRE>
</BLOCKQUOTE>
<PRE><TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Phil Weighill-Smith &lt;<A HREF="mailto:phil.weighill-smith@volantis.com"><U>phil.weighill-smith@volantis.com</U></A>&gt;<BR>
Volantis Systems
</TD>
</TR>
</TABLE>
</PRE>
</BODY>
</HTML>