commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitri Plotnikov <dplot...@yahoo.com>
Subject Re: [jxpath] jxpath vs jaxen
Date Wed, 02 Jul 2003 14:55:00 GMT
Mark,

Here's how you choose between Jaxen and JXPath:

1. If you are applying XPaths to nothing but XML structures you might
want to consider a native framework like Xalan, Jaxen or JXP. Jaxen
will allow you to work with XML in a variety of ways: it supports
several models including DOM, JDOM, DOM4J etc.  

2. If you are working exclusively with Java objects, you might want to
consider an alternative to XPath as an expression language.  Jexl, EL
and ECMAscript are more java-like, which makes them preferred
alternatives to XPath.

3. JXPath is primarily designed to work in mixed environments, where
you have some JavaBeans and other kinds of in-memory Java objects like
maps, arrays, lists etc as well as XML. If you want to use XPath as
your expression language in such a mixed environment, JXPath is your
solution of choice.  An example of such an environment is a Java
implementation of XForm. With XForms, the forms are sometimes backed by
Java objects, thus the need for the transparent traversal of
heterogeneous object graphs.

JXPath was initially developed by yours truly at Plotnix, Inc.  James
did not actually work on JXPath, however he was tremendously helpful in
bringing JXPath to Apache. 


- Dmitri


--- "Mark R. Diggory" <mdiggory@latte.harvard.edu> wrote:
> I'm currently evaluating XPath engines for a project I'm working on.
> I 
> notice JSTL uses Jaxen, while the Commons has its own JXPath. I
> notice 
> James Strachan among others have worked on both engines.
> 
> I'm primarily want to use JXPath (or Jaxen) for working on DOM
> objects 
> in java classes of my own design. Is there any benifit to using
> either 
> of these engines over the other?
> 
> thanks,
> Mark
> 
> -- 
> Mark Diggory
> Software Developer
> Harvard MIT Data Center
> http://www.hmdc.harvard.edu
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

Mime
View raw message