xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: Luca Passani <passani AT eunet.no>
- To: Michael Abato <maengden AT gmail.com>
- Cc: xom-interest <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] javascript
- Date: Fri, 06 May 2005 15:40:07 +0200
Michael Abato wrote:
Depends on what you mean by "display". The stream produced by XOM willa dirty one will do too!
alway encode the '<' as < which is as it should be.
For human editing (vi and friends), people often like to use CDATA
blocks to get around this. But as CDATA has no impact on the infoset
(loosely speaking), there is no clean way to tell XOM to output it.
At the code level, re-reading the XML stream (string/file) willyeah, that's what I need. I am not sure how that turns into code from your description.
produce a scriptElement whose getValue() method will return the '<' in
the string, which is exactly what you need to eval the script as
JavaScript proper, either client-side in the browser,
If you could be more specific, I would be grateful...
or server sidegot a code snippet?
in rhino or equivelent. I've used code much like yours, sent it down
to a browser client via XMLHttpResponse, found the node using the
client DOM, and eval()'ed the value of the node.
If the goal is to display the javascript in html (e.g.: code sample),I am just piping the modified DOM into a web browser with:
it all depends on how you are producing the html.
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println(doc.toXML());
XSLT can produce theI am using a Java servlet...
desired result pretty naturally. JSP with XOM objects may or may not
require encoding/decoding in the code depending on whether you are
using the Element objects directly or the streamed XML
Thank you
Luca
-
[XOM-interest] javascript,
Luca Passani, 05/06/2005
-
Re: [XOM-interest] javascript,
John Cowan, 05/06/2005
-
Re: [XOM-interest] javascript,
Adam Constabaris, 05/06/2005
- Re: [XOM-interest] javascript, Luca Passani, 05/06/2005
-
Re: [XOM-interest] javascript,
Luca Passani, 05/06/2005
- Re: [XOM-interest] javascript, Elliotte Harold, 05/06/2005
-
Re: [XOM-interest] javascript,
Adam Constabaris, 05/06/2005
-
Re: [XOM-interest] javascript,
Elliotte Harold, 05/06/2005
-
Message not available
- Re: [XOM-interest] javascript, Elliotte Harold, 05/06/2005
-
Message not available
-
Re: [XOM-interest] javascript,
John Cowan, 05/06/2005
-
Message not available
-
Re: [XOM-interest] javascript,
Luca Passani, 05/06/2005
-
Re: [XOM-interest] javascript,
Elliotte Harold, 05/06/2005
-
Re: [XOM-interest] javascript,
Luca Passani, 05/06/2005
- Re: [XOM-interest] javascript, Elliotte Harold, 05/06/2005
-
Re: [XOM-interest] javascript,
Luca Passani, 05/06/2005
-
Re: [XOM-interest] javascript,
Elliotte Harold, 05/06/2005
-
Re: [XOM-interest] javascript,
Luca Passani, 05/06/2005
-
Re: [XOM-interest] javascript,
Nils_Kilden-Pedersen, 05/06/2005
- Re: [XOM-interest] javascript, Luca Passani, 05/06/2005
- Re: [XOM-interest] javascript, Luca Passani, 05/06/2005
- <Possible follow-up(s)>
- RE: [XOM-interest] javascript, Jacobs, Robert A., 05/06/2005
- RE: [XOM-interest] javascript, Mustard, Sandy, 05/06/2005
Archive powered by MHonArc 2.6.24.