public class XPathMatcher extends Object
Modifier and Type | Field and Description |
---|---|
protected static boolean |
DEBUG_ALL
Compile to true to debug everything.
|
protected static boolean |
DEBUG_ANY
Don't touch this value unless you add more debug constants.
|
protected static boolean |
DEBUG_MATCH
Compile to true to debug match.
|
protected static boolean |
DEBUG_METHODS
Compile to true to debug method callbacks.
|
protected static boolean |
DEBUG_METHODS2
Compile to true to debug important method callbacks.
|
protected static boolean |
DEBUG_METHODS3
Compile to true to debug the really important methods.
|
protected static boolean |
DEBUG_STACK
Compile to true to debug step index stack.
|
protected Object |
fMatchedString
The matching string.
|
protected static int |
MATCHED |
protected static int |
MATCHED_ATTRIBUTE |
protected static int |
MATCHED_DESCENDANT |
protected static int |
MATCHED_DESCENDANT_PREVIOUS |
Constructor and Description |
---|
XPathMatcher(XPath xpath)
Constructs an XPath matcher that implements a document fragment
handler.
|
Modifier and Type | Method and Description |
---|---|
void |
endElement(QName element,
XSTypeDefinition type,
boolean nillable,
Object value,
short valueType,
ShortList itemValueType) |
protected void |
handleContent(XSTypeDefinition type,
boolean nillable,
Object value,
short valueType,
ShortList itemValueType) |
boolean |
isMatched()
Returns value of first member of fMatched that
is nonzero.
|
protected void |
matched(Object actualValue,
short valueType,
ShortList itemValueType,
boolean isNil)
This method is called when the XPath handler matches the
XPath expression.
|
void |
startDocumentFragment()
The start of the document fragment.
|
void |
startElement(QName element,
XMLAttributes attributes)
The start of an element.
|
String |
toString()
Returns a string representation of this object.
|
protected static final boolean DEBUG_ALL
protected static final boolean DEBUG_METHODS
protected static final boolean DEBUG_METHODS2
protected static final boolean DEBUG_METHODS3
protected static final boolean DEBUG_MATCH
protected static final boolean DEBUG_STACK
protected static final boolean DEBUG_ANY
protected static final int MATCHED
protected static final int MATCHED_ATTRIBUTE
protected static final int MATCHED_DESCENDANT
protected static final int MATCHED_DESCENDANT_PREVIOUS
protected Object fMatchedString
public XPathMatcher(XPath xpath)
xpath
- The xpath.public boolean isMatched()
protected void handleContent(XSTypeDefinition type, boolean nillable, Object value, short valueType, ShortList itemValueType)
protected void matched(Object actualValue, short valueType, ShortList itemValueType, boolean isNil)
public void startDocumentFragment()
public void startElement(QName element, XMLAttributes attributes)
element
- The name of the element.attributes
- The element attributes.SAXException
- Thrown by handler to signal an error.public void endElement(QName element, XSTypeDefinition type, boolean nillable, Object value, short valueType, ShortList itemValueType)
element
- name of the element.type
- content type of this element. IOW, the XML schema type
of the value. Note that this may not be the type declared
in the element declaration, but it is "the actual type". For example,
if the XML is <foo xsi:type="xs:string">aaa</foo>, this
parameter will be "xs:string".nillable
- - nillable
true if the element declaration is nillable.value
- - actual value
the typed value of the content of this element.Copyright © 2018 JBoss by Red Hat. All rights reserved.