Package org.geotools.appschema.util
Class XmlXpathUtilites
Object
XmlXpathUtilites
Ulities class for xpath handling on a jdom document object
- Author:
- Russell Petty (GeoScience Victoria)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
countXPathNodes
(NamespaceSupport ns, String xpathString, Document doc) static String
getSingleXPathValue
(NamespaceSupport ns, String xpathString, Document doc) getXPathValues
(NamespaceSupport ns, String xpathString, Document doc) static String
removeIndexes
(String xpath) Remove indexes from an xpath string.
-
Constructor Details
-
XmlXpathUtilites
public XmlXpathUtilites()
-
-
Method Details
-
getXPathValues
- Parameters:
ns
- namespacesxpathString
- xpath to search ondoc
- xml to search- Returns:
- a list of values matching the xpath in the xml supplied
-
countXPathNodes
- Parameters:
ns
- namespacesxpathString
- xpath to search ondoc
- xml to search- Returns:
- count of the values matching the xpath passed in
-
getSingleXPathValue
- Parameters:
ns
- namespacesxpathString
- xpath to search ondoc
- xml to search- Returns:
- the (single) value matching the xpath in the xml supplied
-
removeIndexes
Remove indexes from an xpath string.- Parameters:
xpath
- xpath string- Returns:
- unindexed xpath string
-