org.ops4j.pax.construct.util
Class XppPathQuery

java.lang.Object
  extended by org.ops4j.pax.construct.util.XppPathQuery

public class XppPathQuery
extends java.lang.Object

Provide a very simple XPATH query implementation for XML pull-parser (Xpp) documents


Constructor Summary
XppPathQuery(java.lang.String xpath)
          Create a new XPATH query object from a given string
 
Method Summary
 int[] queryChildren(org.codehaus.plexus.util.xml.Xpp3Dom parent)
          Find all children matching the XPATH predicate
 org.codehaus.plexus.util.xml.Xpp3Dom queryParent(org.codehaus.plexus.util.xml.Xpp3Dom dom)
          Find the parent node for this XPATH query
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XppPathQuery

public XppPathQuery(java.lang.String xpath)
             throws java.lang.IllegalArgumentException
Create a new XPATH query object from a given string

Parameters:
xpath - simple XPATH query
Throws:
java.lang.IllegalArgumentException
Method Detail

queryParent

public org.codehaus.plexus.util.xml.Xpp3Dom queryParent(org.codehaus.plexus.util.xml.Xpp3Dom dom)
Find the parent node for this XPATH query

Parameters:
dom - document root
Returns:
the parent node

queryChildren

public int[] queryChildren(org.codehaus.plexus.util.xml.Xpp3Dom parent)
Find all children matching the XPATH predicate

Parameters:
parent - the parent node
Returns:
array of child indices


Copyright © 2007-2008 OPS4J. All Rights Reserved.