org.geotools.util
Class XmlXpathUtilites

java.lang.Object
  extended by org.geotools.util.XmlXpathUtilites

public class XmlXpathUtilites
extends java.lang.Object

Ulities class for xpath handling on a jdom document object

Version:
$Id: XmlXpathUtilites.java 34061 2009-10-05 06:31:55Z bencaradocdavies $
Author:
Russell Petty, GSV

Constructor Summary
XmlXpathUtilites()
           
 
Method Summary
static int countXPathNodes(org.xml.sax.helpers.NamespaceSupport ns, java.lang.String xpathString, org.jdom.Document doc)
           
static java.lang.String getSingleXPathValue(org.xml.sax.helpers.NamespaceSupport ns, java.lang.String xpathString, org.jdom.Document doc)
           
static java.util.List<java.lang.String> getXPathValues(org.xml.sax.helpers.NamespaceSupport ns, java.lang.String xpathString, org.jdom.Document doc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlXpathUtilites

public XmlXpathUtilites()
Method Detail

getXPathValues

public static java.util.List<java.lang.String> getXPathValues(org.xml.sax.helpers.NamespaceSupport ns,
                                                              java.lang.String xpathString,
                                                              org.jdom.Document doc)
Parameters:
ns - namespaces
xpathString - xpath to search on
doc - xml to search
Returns:
a list of values matching the xpath in the xml supplied

countXPathNodes

public static int countXPathNodes(org.xml.sax.helpers.NamespaceSupport ns,
                                  java.lang.String xpathString,
                                  org.jdom.Document doc)
Parameters:
ns - namespaces
xpathString - xpath to search on
doc - xml to search
Returns:
count of the values matching the xpath passed in

getSingleXPathValue

public static java.lang.String getSingleXPathValue(org.xml.sax.helpers.NamespaceSupport ns,
                                                   java.lang.String xpathString,
                                                   org.jdom.Document doc)
Parameters:
ns - namespaces
xpathString - xpath to search on
doc - xml to search
Returns:
the (single) value matching the xpath in the xml supplied


Copyright © 1996-2010 Geotools. All Rights Reserved.