commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janek Bogucki <...@studylink.com>
Subject Re: digester + DOM
Date Wed, 26 Feb 2003 14:54:23 GMT
Hi Balazs,

> From: "Balazs Somogyi" <balazs.somogyi@FATHOMTECHNOLOGY.com>
> Reply-To: "Jakarta Commons Users List" <commons-user@jakarta.apache.org>
> Date: Wed, 26 Feb 2003 15:34:36 +0100
> To: <commons-user@jakarta.apache.org>
> Subject: digester + DOM
> 
> Hi,
> 
> Is it possible to feed digester with an already parsed XML (actually
> XHTML).
> I'm using JTidy to parse HTML and would like to extract some of its
> elements but don't want to traverse manually the tree.
> 
> Thanks in advance for your help,
> Balazs
> 

You could address the elements you want with XPath. This is likely to be a
better approach than serializing the XHTML object tree and having Digester
act on that.

Jakarta has an XPath implementation

    http://jakarta.apache.org/commons/jxpath/index.html

There is also Jaxen (http://jaxen.sourceforge.net/) with can be used to
address W3C DOM, dom4j, JDOM and XOM object trees.

-Janek


Mime
View raw message