sigmlstream.xml

## Class XMLUnitFilter

- java.lang.Object
- - org.xml.sax.helpers.XMLFilterImpl
  - - sigmlstream.xml.XMLUnitFilter

- All Implemented Interfaces:
    org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, org.xml.sax.XMLFilter, org.xml.sax.XMLReader

      public class XMLUnitFilter
      extends org.xml.sax.helpers.XMLFilterImpl

  A SAX XML document filter that converts its XML input event stream into a stream of top-level XML unit descriptors.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLUnitFilter(org.xml.sax.XMLReader parent, XMLUnitStreamHandler xushdlr)` Constructs a new XML unit filter, with the given parent XML reader as its source and the given XML unit stream handler as target.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `endElement(java.lang.String uri, java.lang.String lname, java.lang.String qname)` Handles the end of an XML element, as characterized by the given arguments, in the source.
    `int` | `getLevel()` Returns the current XML element level (with 0 as the base value).
    `void` | `startElement(java.lang.String uri, java.lang.String lname, java.lang.String qname, org.xml.sax.Attributes attrs)` Handles the start of a new XML element, as characterized by the given arguments, in the source.

    - ### Methods inherited from class org.xml.sax.helpers.XMLFilterImpl

      `characters, endDocument, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, parse, parse, processingInstruction, resolveEntity, setContentHandler, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XMLUnitFilter

          public XMLUnitFilter(org.xml.sax.XMLReader parent,
                               XMLUnitStreamHandler xushdlr)

      Constructs a new XML unit filter, with the given parent XML reader as its source and the given XML unit stream handler as target.

  - ### Method Detail

    - #### getLevel

          public int getLevel()

      Returns the current XML element level (with 0 as the base value).

    - #### startElement

          public void startElement(java.lang.String uri,
                                   java.lang.String lname,
                                   java.lang.String qname,
                                   org.xml.sax.Attributes attrs)
                            throws org.xml.sax.SAXException

      Handles the start of a new XML element, as characterized by the given arguments, in the source. This will lead to the appropriate steps in the generation of the target event stream.
      Specified by:
        `startElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `startElement` in class `org.xml.sax.helpers.XMLFilterImpl`
      Throws:
        `org.xml.sax.SAXException`

    - #### endElement

          public void endElement(java.lang.String uri,
                                 java.lang.String lname,
                                 java.lang.String qname)
                          throws org.xml.sax.SAXException

      Handles the end of an XML element, as characterized by the given arguments, in the source. This will lead to the appropriate steps in the generation of the target event stream.
      Specified by:
        `endElement` in interface `org.xml.sax.ContentHandler`
      Overrides:
        `endElement` in class `org.xml.sax.helpers.XMLFilterImpl`
      Throws:
        `org.xml.sax.SAXException`