Class XMLValidator2


  • public class XMLValidator2
    extends java.lang.Object
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.util.HashMap cache  
      protected java.io.ByteArrayOutputStream errors  
      protected org.xml.sax.EntityResolver resolver  
    • Constructor Summary

      Constructors 
      Constructor Description
      XMLValidator2​(java.sql.Connection conn)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getErrors()
      Returns errors.
      int isSchemaValid​(oracle.jdbc.OracleClob xml, java.lang.String schema)  
      int isSchemaValid​(oracle.sql.CLOB xml, java.lang.String schema)  
      void schemaValidate​(oracle.jdbc.OracleClob xml, java.lang.String schema)  
      void schemaValidate​(oracle.sql.CLOB xml, java.lang.String schema)  
      • Methods inherited from class java.lang.Object

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

      • cache

        protected java.util.HashMap cache
      • resolver

        protected org.xml.sax.EntityResolver resolver
      • errors

        protected java.io.ByteArrayOutputStream errors
    • Constructor Detail

      • XMLValidator2

        public XMLValidator2​(java.sql.Connection conn)
    • Method Detail

      • getErrors

        public java.lang.String getErrors()
        Returns errors.
        Returns:
        String
      • isSchemaValid

        public int isSchemaValid​(oracle.sql.CLOB xml,
                                 java.lang.String schema)
        Parameters:
        xml - The CLOB object for the XML to be validated.
        schema - The URL for the XSD to be validated.
        Returns:
        1 if valid; else 0.
      • isSchemaValid

        public int isSchemaValid​(oracle.jdbc.OracleClob xml,
                                 java.lang.String schema)
        Parameters:
        xml - The CLOB object for the XML to be validated.
        schema - The URL for the XSD to be validated.
        Returns:
        1 if valid; else 0.
      • schemaValidate

        public void schemaValidate​(oracle.sql.CLOB xml,
                                   java.lang.String schema)
                            throws oracle.xml.parser.v2.XMLParseException,
                                   org.xml.sax.SAXException,
                                   java.io.IOException,
                                   oracle.xml.parser.schema.XSDException,
                                   java.sql.SQLException,
                                   java.lang.Exception
        Parameters:
        xml - The CLOB object for the XML to be validated.
        schema - The URL for the XSD to be validated.
        Throws:
        oracle.xml.parser.v2.XMLParseException
        org.xml.sax.SAXException
        java.io.IOException
        oracle.xml.parser.schema.XSDException
        java.sql.SQLException
        java.lang.Exception
      • schemaValidate

        public void schemaValidate​(oracle.jdbc.OracleClob xml,
                                   java.lang.String schema)
                            throws oracle.xml.parser.v2.XMLParseException,
                                   org.xml.sax.SAXException,
                                   java.io.IOException,
                                   oracle.xml.parser.schema.XSDException,
                                   java.sql.SQLException,
                                   java.lang.Exception
        Parameters:
        xml - The OracleClob object for the XML to be validated.
        schema - The URL for the XSD to be validated.
        Throws:
        oracle.xml.parser.v2.XMLParseException
        org.xml.sax.SAXException
        java.io.IOException
        oracle.xml.parser.schema.XSDException
        java.sql.SQLException
        java.lang.Exception