commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark R. Diggory" <>
Subject Re: [jxpath] jxpath vs jaxen
Date Wed, 02 Jul 2003 17:02:39 GMT
Thank you, this is all very helpfull. I am currently working with what 
could only be described as a "dual object" model where DOM fragments of 
a Document can be gotten at though two different approaches (1. via a 
Map/Collection like java class object that holds references to various 
parts of the document and 2. by traversing the Document's DOM directly). 
I want to use the Object model to provide a standard interface for 
adding/removing specific sections of the DOM which represent "resources" 
in our system, while the rest of the DOM content can be easily 
manipulated through manipulating the DOM directly. So it would appear 
that JXPath would probibly be ideal in this situation too.


Dmitri Plotnikov wrote:

>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" <> wrote:
>>I'm currently evaluating XPath engines for a project I'm working on.
>>notice JSTL uses Jaxen, while the Commons has its own JXPath. I
>>James Strachan among others have worked on both engines.
>>I'm primarily want to use JXPath (or Jaxen) for working on DOM
>>in java classes of my own design. Is there any benifit to using
>>of these engines over the other?
>>Mark Diggory
>>Software Developer
>>Harvard MIT Data Center
>>To unsubscribe, e-mail:
>>For additional commands, e-mail:
>Do you Yahoo!?
>SBC Yahoo! DSL - Now only $29.95 per month!
>To unsubscribe, e-mail:
>For additional commands, e-mail:

Mark Diggory
Software Developer
Harvard MIT Data Center

View raw message