|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.adaptx.xpath.XPathNode
public abstract class XPathNode
Abstract class representing a node in a document tree, on which XPath expressions can be evaluated. This abstract class provides all the services required by XPath, and enables multiple implementations to exist. It does not make use of iterators or traversals, but assumes double-linked lists are used to maintain node lists.
Field Summary | |
---|---|
static int |
ATTRIBUTE
Node is an attribute. |
static int |
COMMENT
Node is a comment. |
static int |
ELEMENT
Node is an element. |
static int |
NAMESPACE
Node is a namespace node. |
static int |
PI
Node is a processing instruction. |
static int |
ROOT
Node is a root node. |
static int |
TEXT
Node is a text node. |
Constructor Summary | |
---|---|
XPathNode()
|
Method Summary | |
---|---|
abstract java.lang.String |
getAttribute(java.lang.String uri,
java.lang.String local)
Returns the value of the named attribute, or null if the node has no such attribute. |
abstract XPathNode |
getFirstAttribute()
Returns the first in a list of attribute nodes, or null if the node has no attributes. |
abstract XPathNode |
getFirstChild()
Returns the first child node of this node, or null if the node has no children. |
abstract XPathNode |
getFirstNamespace()
Returns the first in a list of namespace nodes, or null if the node has no namespaces. |
abstract java.lang.String |
getLocalName()
Returns the local name of the node. |
abstract java.lang.String |
getNamespacePrefix(java.lang.String uri)
Returns the namespace prefix associated with this namespace URI, as defined in the context of this node. |
abstract java.lang.String |
getNamespaceURI()
Returns the namespace URI the node. |
abstract java.lang.String |
getNamespaceURI(java.lang.String prefix)
Returns the namespace URI associated with this namespace prefix, as defined in the context of this node. |
abstract XPathNode |
getNext()
Returns the next sibling node in document order, or null if this node is the last node. |
abstract int |
getNodeType()
Returns the type of this node. |
abstract XPathNode |
getParentNode()
Returns the parent node, or null if the node has no parent. |
abstract XPathNode |
getPrevious()
Returns the previous sibling node in document order, or null if this node is the first node. |
abstract XPathNode |
getRootNode()
Returns the root node. |
abstract java.lang.String |
getStringValue()
Returns the string value of the node. |
abstract boolean |
hasChildNodes()
Returns true if this node has any child nodes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ELEMENT
public static final int ATTRIBUTE
public static final int TEXT
public static final int PI
public static final int COMMENT
public static final int ROOT
public static final int NAMESPACE
Constructor Detail |
---|
public XPathNode()
Method Detail |
---|
public abstract XPathNode getFirstChild()
public abstract boolean hasChildNodes()
public abstract XPathNode getNext()
public abstract XPathNode getPrevious()
public abstract int getNodeType()
public abstract XPathNode getFirstAttribute()
public abstract java.lang.String getAttribute(java.lang.String uri, java.lang.String local)
uri
- The attribute's namespace URI, or nulllocal
- The attribute's local name
public abstract XPathNode getFirstNamespace()
public abstract java.lang.String getLocalName()
public abstract java.lang.String getNamespaceURI()
public abstract XPathNode getParentNode()
public abstract XPathNode getRootNode()
public abstract java.lang.String getStringValue()
public abstract java.lang.String getNamespaceURI(java.lang.String prefix)
prefix
- The namespace prefix
public abstract java.lang.String getNamespacePrefix(java.lang.String uri)
uri
- The namespace URI
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |