[jdom-interest] Problems with '<' and '>' in element.addConte
MDoraisamy at SELECTICA.com
Wed Jan 2 04:44:39 PST 2002
"But im not certain JDOM is good for html as valid html is not nesesarily
yes. i accept that. But is there a better way of converting JDOM to HTML ?
I am not convinced with converting JDOM to streamsource and coverting into
HTML using XSLT. how much is the performance loss ?
Is there a native XSLT for JDOM available ?
From: Ken Rune Helland [mailto:kenh at csc.no]
Sent: Wednesday, January 02, 2002 5:34 PM
To: ann_b15 at hotmail.com
Cc: jdom-interest at jdom.org
Subject: Re: [jdom-interest] Problems with '<' and '>' in
> I have a problem when I try to add content included the signs "<"
> and ">"to an element. I write:
The characters '<' and '>' are xml characters and jdom asumes when these
characters is in a child content that these characters is to be escaped as
not to be read as xml characters ( '<' is the escape for '<' and '>'
To get what you need i jdom you must make a 'HTML' element and add a 'HEAD'
element and a 'BODY' element as children to the 'HTML' element.
Content inside the body must then be added as children to the 'BODY'
Element root = new Element("HTML");
Document doc = new Document( root );
Element body = new Element("BODY");
Element header1 = new Element("H1");
When outputting this document you shoud get someting like
But im not certain JDOM is good for html as valid html is not nesesarily
To control your jdom-interest membership:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the jdom-interest