com.codemonster.surinam.parser
Class XPath
java.lang.Object
com.codemonster.surinam.parser.XPath
public class XPath
- extends Object
An XPath is a simplified way to work in different portions of an XML document. By creating them as
objects, we can create and reuse them when it is worthwhile.
There a couple of rules that help define XPaths:
- Paths are always from the root node.
- Paths do not contain terminal nodes.
|
Constructor Summary |
XPath()
We have to allow for empty paths which map to a root-level path. |
XPath(String path)
|
XPath
public XPath()
- We have to allow for empty paths which map to a root-level path.
XPath
public XPath(String path)
setPath
public void setPath(String path)
getPath
public String getPath()
- Returns:
- Returns the local path string that is inside this object (prefixes are not included).
For the full path, call toString().
getPathSegments
public List<String> getPathSegments()
- Returns:
- Returns a complete list of path segments, including all prefixes.
iterator
public Iterator<String> iterator()
Copyright © 2010. All Rights Reserved.