Dominik,
the only suggestion I can give you is to output entity references
like " " using a separate call to addEntity, e.g.
body.addText("First");
body.addEntity("nbsp", "");
body.addText("Test");
Silvain
----- Original Message -----
From: "Actor630" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 8:19
Subject: [dom4j-user] CDATA output in HTML
> Hello,
>
> I'm trying to produce an output in pure HTML but there is always CDATA in
my
> output.
>
> This is the output of my code:
> <html>
> <body><![CDATA[First test]]></body>
> </html>
>
> Here is the output I want:
> <html>
> <body>First test</body>
> </html>
>
>
> import java.io.OutputStream;
> import org.dom4j.*;
> import org.dom4j.io.*;
>
> public class CreateHtml
> {
> public static void main(String[] arguments) throws Exception
> {
> CreateHtml start = new CreateHtml();
> start.create(System.out);
> }
> private void create(OutputStream out) throws Exception
> {
> HTMLWriter writer = new HTMLWriter(out);
> Document document = DocumentHelper.createDocument();
>
> Element body = document.addElement("html").addElement("body");
> body.addCDATA("First Test");
> writer.write(document);
> }
> }
>
> kindly regards
> Dominik Deimling
>
>
>
>
> _______________________________________________
> dom4j-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/dom4j-user
_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user