This post originated from an RSS feed registered with Java Buzz
by Wolf Paulus.
Original Post: XQuery, XmlPull, and XPath
Feed Title: Wolf's Web Journal
Feed URL: http://wolfpaulus.com/feed/
Feed Description: Journal - dedicated to excellence, and motivated by enthusiasm to trying new things
XQuery is getting a lot of attention lately and the CarlsbadCubes' Forum/Mailinglist became a gathering place for SAX and xmlpull parsing enthusiasts. I feel kind-of left behind since I'm still wondering who in his right mind likes to write XQuery statements and SAX parsing code?
It's almost like last year's discussion .. you cannot be a real Java coder if you are using an IDE .. real men use vi.
Well, that wouldn't be me. Anyway, I'm still using JDOM and Jaxen wherever I feel appropriate and convenient of course. For instance, while working on Franklin, the upcoming visual XUL-Editor for Swixml, I needed a list of all the ActionCommands that have been assigned to toolbar buttons.
Franklin's core will be used for Swixml, Thinlet, and some flavor of Flash-XUL, still Franklin's UI will be created using Swixml and therefore the following XPATH returned exactly what I needed:
Since the GUI descriptor is already a JDOM document, using Jaxen for XPath processing solved the problem with 3 lines of code.
If you are not an XPATH expert have a look here: http://www.w3schools.com/xpath/ and use Alex Chaffee's XPath Explorer to test your XPATH expressions.