de.fesenmeyer.dbnormalizer.core.configuration.xml
Class DOMValidator

java.lang.Object
  extended by de.fesenmeyer.dbnormalizer.core.configuration.xml.DOMValidator

public class DOMValidator
extends Object

Class which provides the possibility to validate a DOM-Document against a XML-Schema.

Author:
DF

Field Summary
private  Document doc
          The DOM-Document.
private  String schemaFile
          The schema's filename.
 
Constructor Summary
DOMValidator(Document doc, String schemaFile)
          Class constructor specifying DOM-Document and the filename of the XML-Schema to be used.
 
Method Summary
 void validate()
          Validates the DOM-Document against the XML-Schema, as specified in the constructor.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

schemaFile

private String schemaFile
The schema's filename.


doc

private Document doc
The DOM-Document.

Constructor Detail

DOMValidator

public DOMValidator(Document doc,
                    String schemaFile)
Class constructor specifying DOM-Document and the filename of the XML-Schema to be used.

Parameters:
doc - the DOM-Document
schemaFile - the XML-Schema's filename
Method Detail

validate

public void validate()
              throws SAXException,
                     IOException
Validates the DOM-Document against the XML-Schema, as specified in the constructor.

Throws:
SAXException - if the XML-validation fails, e.g. if the DOM-Document is not well-formed or not valid.
IOException - (very unlikely to occur)