xml

## Class XmlValidator

- java.lang.Object
- - xml.XmlValidator

-     public class XmlValidator
      extends java.lang.Object

  SAX-based XML validator.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XmlValidator()` Constructs a new validator using the standard error stream for error reporting.
    `XmlValidator(java.io.PrintWriter prntr)` Constructs a new validator using the given print writer for error reporting.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `printSAXParseException(org.xml.sax.SAXParseException e)` Reports the given SAX parsing exception.
    `void` | `printSAXParseException(org.xml.sax.SAXParseException e, java.lang.String kind)` Reports the given SAX parsing exception and its kind.
    `void` | `validate(java.io.File f)` Attempts to validate the XML document in the given file.
    `void` | `validate(java.io.File f, CleanerEntityResolver er)` Attempts to validate the XML document in the given file, using the given entity resolver if it is non-null.
    `void` | `validate(org.xml.sax.InputSource ins)` Attempts to validate the XML document on the given input source.
    `void` | `validate(org.xml.sax.InputSource ins, CleanerEntityResolver er)` Attempts to validate the XML document on the given input source, using the given entity resolver if it is non-null.
    `void` | `validate(java.lang.String uri)` Attempts to validate the XML document with the given URI.
    `void` | `validate(java.lang.String uri, CleanerEntityResolver er)` Attempts to validate the XML document with the given URI, using the given entity resolver if it is non-null.

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

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

- - ### Constructor Detail

    - #### XmlValidator

          public XmlValidator()
                       throws javax.xml.parsers.ParserConfigurationException,
                              org.xml.sax.SAXException

      Constructs a new validator using the standard error stream for error reporting.
      Throws:
        `javax.xml.parsers.ParserConfigurationException`
        `org.xml.sax.SAXException`

    - #### XmlValidator

          public XmlValidator(java.io.PrintWriter prntr)
                       throws javax.xml.parsers.ParserConfigurationException,
                              org.xml.sax.SAXException

      Constructs a new validator using the given print writer for error reporting.
      Throws:
        `javax.xml.parsers.ParserConfigurationException`
        `org.xml.sax.SAXException`

  - ### Method Detail

    - #### validate

          public void validate(org.xml.sax.InputSource ins,
                               CleanerEntityResolver er)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               InvalidXMLException

      Attempts to validate the XML document on the given input source, using the given entity resolver if it is non-null.
      Throws:
        `java.io.IOException`
        `org.xml.sax.SAXException`
        `InvalidXMLException`

    - #### validate

          public void validate(org.xml.sax.InputSource ins)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               InvalidXMLException

      Attempts to validate the XML document on the given input source.
      Throws:
        `java.io.IOException`
        `org.xml.sax.SAXException`
        `InvalidXMLException`

    - #### validate

          public void validate(java.io.File f,
                               CleanerEntityResolver er)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               InvalidXMLException

      Attempts to validate the XML document in the given file, using the given entity resolver if it is non-null.
      Throws:
        `java.io.IOException`
        `org.xml.sax.SAXException`
        `InvalidXMLException`

    - #### validate

          public void validate(java.io.File f)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               InvalidXMLException

      Attempts to validate the XML document in the given file.
      Throws:
        `java.io.IOException`
        `org.xml.sax.SAXException`
        `InvalidXMLException`

    - #### validate

          public void validate(java.lang.String uri,
                               CleanerEntityResolver er)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               InvalidXMLException

      Attempts to validate the XML document with the given URI, using the given entity resolver if it is non-null.
      Throws:
        `java.io.IOException`
        `org.xml.sax.SAXException`
        `InvalidXMLException`

    - #### validate

          public void validate(java.lang.String uri)
                        throws java.io.IOException,
                               org.xml.sax.SAXException,
                               InvalidXMLException

      Attempts to validate the XML document with the given URI.
      Throws:
        `java.io.IOException`
        `org.xml.sax.SAXException`
        `InvalidXMLException`

    - #### printSAXParseException

          public void printSAXParseException(org.xml.sax.SAXParseException e)

      Reports the given SAX parsing exception.

    - #### printSAXParseException

          public void printSAXParseException(org.xml.sax.SAXParseException e,
                                             java.lang.String kind)

      Reports the given SAX parsing exception and its kind.