public class XPathMatcher
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| protected static boolean | DEBUG_ALLCompile to true to debug everything. | 
| protected static boolean | DEBUG_ANYDon't touch this value unless you add more debug constants. | 
| protected static boolean | DEBUG_MATCHCompile to true to debug match. | 
| protected static boolean | DEBUG_METHODSCompile to true to debug method callbacks. | 
| protected static boolean | DEBUG_METHODS2Compile to true to debug important method callbacks. | 
| protected static boolean | DEBUG_METHODS3Compile to true to debug the really important methods. | 
| protected static boolean | DEBUG_STACKCompile to true to debug step index stack. | 
| protected java.lang.Object | fMatchedStringThe matching string. | 
| protected java.lang.String | fXpathDefaultNamespaceXPath default namespace. | 
| 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(org.apache.xerces.xni.QName element,
          org.apache.xerces.xs.XSTypeDefinition type,
          boolean nillable,
          java.lang.Object value,
          short valueType,
          org.apache.xerces.xs.ShortList itemValueType) | 
| protected void | handleContent(org.apache.xerces.xs.XSTypeDefinition type,
             boolean nillable,
             java.lang.Object value,
             short valueType,
             org.apache.xerces.xs.ShortList itemValueType) | 
| boolean | isMatched()Returns value of first member of fMatched that
 is nonzero. | 
| protected void | matched(java.lang.Object actualValue,
       short valueType,
       org.apache.xerces.xs.ShortList itemValueType,
       boolean isNil)This method is called when the XPath handler matches the
 XPath expression. | 
| void | setXPathDefaultNamespace(java.lang.String xpathDefaultNamespace) | 
| void | startDocumentFragment()The start of the document fragment. | 
| void | startElement(org.apache.xerces.xni.QName element,
            org.apache.xerces.xni.XMLAttributes attributes)The start of an element. | 
| java.lang.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 java.lang.Object fMatchedString
protected java.lang.String fXpathDefaultNamespace
public XPathMatcher(XPath xpath)
xpath - The xpath.public boolean isMatched()
protected void handleContent(org.apache.xerces.xs.XSTypeDefinition type,
                 boolean nillable,
                 java.lang.Object value,
                 short valueType,
                 org.apache.xerces.xs.ShortList itemValueType)
protected void matched(java.lang.Object actualValue,
           short valueType,
           org.apache.xerces.xs.ShortList itemValueType,
           boolean isNil)
public void startDocumentFragment()
public void startElement(org.apache.xerces.xni.QName element,
                org.apache.xerces.xni.XMLAttributes attributes)
element - The name of the element.attributes - The element attributes.org.xml.sax.SAXException - Thrown by handler to signal an error.public void endElement(org.apache.xerces.xni.QName element,
              org.apache.xerces.xs.XSTypeDefinition type,
              boolean nillable,
              java.lang.Object value,
              short valueType,
              org.apache.xerces.xs.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.public java.lang.String toString()
toString in class java.lang.Objectpublic void setXPathDefaultNamespace(java.lang.String xpathDefaultNamespace)
Copyright © 1999-2022 The Apache Software Foundation. All Rights Reserved.