Joda - Next Generation Beans |
|
Project
Joda Time
Joda Primitives
Joda Beans
Contributing
  |
Joda XPath integrationJoda's XPath integration aims to ease the process of accessing data from the object model. The XPath engine used is Jaxen which has proved easy to use. The XPath engine operates directly on the object model. This means that there is no intermediate step of converting the model to XML before querying takes place. This makes the search quite efficient. Joda XPathA Joda domain model bean can be queried using XPath easily:
XPath xpath = new XPath("address[2]/town/text()"); Profile profile = (Profile) JodaFactory.create(Profile.class); String str = (String) xpath.selectSingleNode(profile);
In this example, the xpath means get the text of the town of the second address of the object passed in. (In this case It is possible to extract text, property objects and beans using the XPath class. It is also possible to retrieve a list of results and not just one as shown above. Current statusJoda currently supports standard XPath notation as supported by Jaxen. The todo list includes an implementation of a more Java-friendly (less XML like) syntax. |
Last updated 31st January 2004.
Website and development hosting by SourceForge.
Copyright (c) 2001-2004 Stephen Colebourne. All rights reserved.
Java and JavaBeans are trademarks of Sun Microsystems.