public class XPath extends Object
Copyright (C) 2002 Hewlett-Packard Company. This file is part of Sparta, an XML Parser, DOM, and XPath library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
A one-level clone in which the steps list is cloned but not the steps objects themselves.
|
static XPath |
get(boolean isAbsolute,
Step[] steps)
Create an XPath from some steps.
|
static XPath |
get(String xpathString)
Return the xpath parse-tree object for this expression.
|
String |
getIndexingAttrName()
Return the attribute name in a trailing [@attrName] predicate.
|
String |
getIndexingAttrNameOfEquals()
Return the attribute name in a trailing [@attrName='attrValue'] predicate
or null if it someother type of predicate..
|
Enumeration |
getSteps() |
boolean |
isAbsolute()
Does this path begin with a '/' or '//' ?
|
boolean |
isStringValue()
Does xpath evaluate to a string values (attribute values or
text() nodes)
|
static boolean |
isStringValue(String xpathString)
Convenience function equivalent to get(xpathString).isStringValue()
|
String |
toString() |
public boolean isAbsolute()
public boolean isStringValue()
public Enumeration getSteps()
public String getIndexingAttrName() throws XPathException
XPathExceptionpublic String getIndexingAttrNameOfEquals() throws XPathException
XPathExceptionpublic Object clone()
public static XPath get(String xpathString) throws XPathException
XPathExceptionpublic static XPath get(boolean isAbsolute, Step[] steps)
public static boolean isStringValue(String xpathString) throws XPathException, IOException
XPathExceptionIOExceptionCopyright © 2016. All Rights Reserved.