|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.caucho.xpath.Pattern
A node selection pattern. Patterns represent compiled XPath node selectors. They can be used to find nodes, select nodes, and test if a node matches a pattern.
There are two types of patterns: select patterns and match patterns.
Select patterns match a node relative to another node.
find
and select
use select patterns.
Match patterns match a node in isolation. isMatch
uses
match patterns.
Field Summary | |
protected static WriteStream |
dbg
|
Method Summary | |
Node |
find(Node node)
Returns the first node matching the pattern. |
Node |
find(Node node,
ExprEnvironment env)
Returns the first node matching the pattern. |
com.caucho.xpath.pattern.AbstractPattern |
getPattern()
Returns the underlying pattern implementation. |
boolean |
isMatch(Node node)
Test if the node matches the pattern. |
boolean |
isMatch(Node node,
ExprEnvironment env)
Test if the node matches the pattern. |
com.caucho.xpath.pattern.NodeIterator |
select(Node node)
Selects all nodes matching the pattern. |
com.caucho.xpath.pattern.NodeIterator |
select(Node node,
ExprEnvironment env)
Selects all nodes matching the pattern. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static WriteStream dbg
Method Detail |
public Node find(Node node) throws XPathException
node
- node represented by '.' and start of match.public Node find(Node node, ExprEnvironment env) throws XPathException
node
- node represented by '.' and start of match.env
- variable environment.public com.caucho.xpath.pattern.NodeIterator select(Node node) throws XPathException
node
- node represented by '.' and start of match.public com.caucho.xpath.pattern.NodeIterator select(Node node, ExprEnvironment env) throws XPathException
context
- node represented by '.' and start of match.env
- variable environment.public boolean isMatch(Node node) throws XPathException
node
- node to testpublic boolean isMatch(Node node, ExprEnvironment env) throws XPathException
node
- node to testenv
- variable environment.public com.caucho.xpath.pattern.AbstractPattern getPattern()
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |