Class ElementFilter


  • public class ElementFilter
    extends SimpleFilter
    This is a simple element-only filter, that accepts those element nodes that match the given element name.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.String mLocalName  
      (package private) java.lang.String mNsURI  
    • Constructor Summary

      Constructors 
      Constructor Description
      ElementFilter​(java.lang.String localName)  
      ElementFilter​(java.lang.String nsURI, java.lang.String localName)  
      ElementFilter​(javax.xml.namespace.QName elemName)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean accept​(SMEvent evt, SMInputCursor caller)
      Methods iterators call to check whether specified event should be return, or filtered out.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • mNsURI

        final java.lang.String mNsURI
      • mLocalName

        final java.lang.String mLocalName
    • Constructor Detail

      • ElementFilter

        public ElementFilter​(java.lang.String nsURI,
                             java.lang.String localName)
      • ElementFilter

        public ElementFilter​(java.lang.String localName)
      • ElementFilter

        public ElementFilter​(javax.xml.namespace.QName elemName)
    • Method Detail

      • accept

        public boolean accept​(SMEvent evt,
                              SMInputCursor caller)
                       throws javax.xml.stream.XMLStreamException
        Description copied from class: SMFilter
        Methods iterators call to check whether specified event should be return, or filtered out.
        Overrides:
        accept in class SimpleFilter
        Parameters:
        evt - Enumerated (type of the) event that would be passed/filtered
        caller - Iterator that is calling this filter. Note that at this point it is possible that not all state information of iterator have been updated; however, its stream reader should be accessible, as well as tracked element information PRIOR to current node (which may or may not be a start element)
        Returns:
        If true, event is to be returned; if false, it should be filtered out.
        Throws:
        javax.xml.stream.XMLStreamException