pl.psnc.dl.ege.validator.xml
Class SchemaValidator

java.lang.Object
  extended by pl.psnc.dl.ege.validator.xml.SchemaValidator
All Implemented Interfaces:
XmlValidator

public class SchemaValidator
extends java.lang.Object
implements XmlValidator

Performs XML document validation over specified XML schema (according to - W3 XML Schema, specification).

Author:
mariuszs

Constructor Summary
SchemaValidator(java.lang.String schemeUrl)
          Default constructor.
SchemaValidator(java.lang.String schemeUrl, java.lang.String defaultUrl)
           
 
Method Summary
 void validateXml(java.io.InputStream inputData, org.xml.sax.ErrorHandler errorHandler)
          Validates streamed XML data according to XML scheme rules.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaValidator

public SchemaValidator(java.lang.String schemeUrl)
Default constructor.
Sets StandardErrorHandler as default error handler.

Parameters:
schemeUrl - - URL reference to XML Scheme

SchemaValidator

public SchemaValidator(java.lang.String schemeUrl,
                       java.lang.String defaultUrl)
Method Detail

validateXml

public void validateXml(java.io.InputStream inputData,
                        org.xml.sax.ErrorHandler errorHandler)
                 throws org.xml.sax.SAXException,
                        java.io.IOException,
                        java.lang.Exception
Validates streamed XML data according to XML scheme rules.
Validation result and messages can be stored by error handler (StandardErrorHandler by default).

Specified by:
validateXml in interface XmlValidator
Parameters:
inputData - - streamed XML data.
Throws:
org.xml.sax.SAXException
{@link - IOException}
java.io.IOException
java.lang.Exception


Copyright © 2010. All Rights Reserved.