xml

## Class XMLStringSAXHandler

- java.lang.Object
- - org.xml.sax.helpers.DefaultHandler
  - - xml.BasicSAXHandler
    - - xml.XMLStringSAXHandler

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

      public class XMLStringSAXHandler
      extends BasicSAXHandler

  A SAX Handler equipped with a `XMLScanner`, an XML document string, and a protected method, `runSAXScanner()`, which uses the scanner to parse the XML string, feeding the resulting parse events to this handler.

  The intention is that a subclass should define parse event handling methods as required, together with accessor methods for the data accumulated by those event handling methods. The subclass constructor should conclude with an invocation of the `runSAXScanner()` method inherited from this class.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XMLStringSAXHandler(java.lang.String xmlkindtag, CleanerEntityResolver cer, java.lang.String xml)` Constructs a new handler, with a non-validating parser, for the given XML document text, with the given XML kind tag for use in error reporting, and using the given entity resolver during parsing.
    `XMLStringSAXHandler(java.lang.String xmlkindtag, CleanerEntityResolver cer, java.lang.String xml, boolean validate)` Constructs a new handler for the given XML document text, with the given XML kind tag for use in error reporting, using the given entity resolver during parsing, and using the given flag to determine whether or not the handler should use a validating parser.
    `XMLStringSAXHandler(java.lang.String xmlkindtag, java.lang.String xml)` Constructs a new handler, with a non-validating parser, for the given XML document text, with the given XML kind tag for use in error reporting.
    `XMLStringSAXHandler(java.lang.String xmlkindtag, java.lang.String xml, boolean validate)` Constructs a new handler for the given XML document text, with the given XML kind tag for use in error reporting, and using the given flag to determine whether or not the handler should use a validating parser.

  - ### Method Summary

    - ### Methods inherited from class xml.BasicSAXHandler

      `error, fatalError, resolveEntity, setDocumentLocator, warning`

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

      `characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl`

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

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

- - ### Constructor Detail

    - #### XMLStringSAXHandler

          public XMLStringSAXHandler(java.lang.String xmlkindtag,
                                     java.lang.String xml)
                              throws XMLScanner.ScanException

      Constructs a new handler, with a non-validating parser, for the given XML document text, with the given XML kind tag for use in error reporting.
      Throws:
        `XMLScanner.ScanException`

    - #### XMLStringSAXHandler

          public XMLStringSAXHandler(java.lang.String xmlkindtag,
                                     java.lang.String xml,
                                     boolean validate)
                              throws XMLScanner.ScanException

      Constructs a new handler for the given XML document text, with the given XML kind tag for use in error reporting, and using the given flag to determine whether or not the handler should use a validating parser.
      Throws:
        `XMLScanner.ScanException`

    - #### XMLStringSAXHandler

          public XMLStringSAXHandler(java.lang.String xmlkindtag,
                                     CleanerEntityResolver cer,
                                     java.lang.String xml)
                              throws XMLScanner.ScanException

      Constructs a new handler, with a non-validating parser, for the given XML document text, with the given XML kind tag for use in error reporting, and using the given entity resolver during parsing.
      Throws:
        `XMLScanner.ScanException`

    - #### XMLStringSAXHandler

          public XMLStringSAXHandler(java.lang.String xmlkindtag,
                                     CleanerEntityResolver cer,
                                     java.lang.String xml,
                                     boolean validate)
                              throws XMLScanner.ScanException

      Constructs a new handler for the given XML document text, with the given XML kind tag for use in error reporting, using the given entity resolver during parsing, and using the given flag to determine whether or not the handler should use a validating parser.
      Throws:
        `XMLScanner.ScanException`