[jdom-interest] XPath bindings?
Bradley S. Huffman
hip at a.cs.okstate.edu
Fri Oct 12 12:49:42 PDT 2001
Just thought of another point, Jaxen isn't bound specifically to JDOM.
You can use JDOM, DOM4J, DOM, EXML, anything you can write a
DocumentNavigator for. Also JDOM isn't bound to a particular parser, it
has a process for finding a parser to use if one isn't specified, but it's
not bound to one. Heck, even the behavior of the methods in Element isn't
final (except for equals); extended Element, tweak the Factory and let the
fun begin.
So doesn't having Element.selectNodes() make JODM bound to
Jaxen (or a particular implementation of XPath)? What if a better
implementation comes along? Guess you could extended Element, override
selectNodes(), tweak the Factory and go from there. Naaaa, I still
think keeping the API small, simple, and well-defined is the best
approach.
Off topic: Has anyone else wondered about data-binding and Jaxen. I was
playing with JAXB a few days ago and after generating a few classes, I
started think of how you could automatically generate a Jaxen
DocumentNavigator to work with these generated classes and get the best
of both worlds.
Brad
More information about the jdom-interest
mailing list