XPath for XML Store

Documentation

API Docs
xpath.ps.gz

Binaries

xpath.jar
java_cup.jar
junit.jar
JLex.jar

The file xpath.jar contains both source code and compiled code. You need java_cup.jar to run it. You need junit.jar to run the tests, and JLex.jar if you need to recompile the JLex source file.

Update: XPath is now part of the main XMLStore distribution available at: www.plan-x.org/xmlstore/. The XMLStoreNavigator is found in this distribution.

Example

    // Perform query

    Navigator navigator = new DOMNavigator();
    XPath xpath = new XPath("//monkey/text()", navigator);
    XNodeSet nodes = (XNodeSet) xpath.evaluate(root);

    // Display results

    Iterator it = nodes.iterator();
    while (it.hasNext()) {
        System.out.println("Monkey: "+it.next());
    }
    

Up
  Last updated: 18th of March 2004 19:08 (Thomas Ambus)