|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.caucho.xpath.Pattern
public class 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 java.util.logging.Logger |
log
|
Method Summary | |
---|---|
org.w3c.dom.Node |
find(org.w3c.dom.Node node)
Returns the first node matching the pattern. |
org.w3c.dom.Node |
find(org.w3c.dom.Node node,
ExprEnvironment env)
Returns the first node matching the pattern. |
AbstractPattern |
getPattern()
Returns the underlying pattern implementation. |
boolean |
isMatch(org.w3c.dom.Node node)
Test if the node matches the pattern. |
boolean |
isMatch(org.w3c.dom.Node node,
ExprEnvironment env)
Test if the node matches the pattern. |
NodeIterator |
select(org.w3c.dom.Node node)
Selects all nodes matching the pattern. |
NodeIterator |
select(org.w3c.dom.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 final java.util.logging.Logger log
Method Detail |
---|
public org.w3c.dom.Node find(org.w3c.dom.Node node) throws XPathException
node
- node represented by '.' and start of match.
XPathException
public org.w3c.dom.Node find(org.w3c.dom.Node node, ExprEnvironment env) throws XPathException
node
- node represented by '.' and start of match.env
- variable environment.
XPathException
public NodeIterator select(org.w3c.dom.Node node) throws XPathException
node
- node represented by '.' and start of match.
XPathException
public NodeIterator select(org.w3c.dom.Node node, ExprEnvironment env) throws XPathException
context
- node represented by '.' and start of match.env
- variable environment.
XPathException
public boolean isMatch(org.w3c.dom.Node node) throws XPathException
node
- node to test
XPathException
public boolean isMatch(org.w3c.dom.Node node, ExprEnvironment env) throws XPathException
node
- node to testenv
- variable environment.
XPathException
public AbstractPattern getPattern()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |