org.ephman.utils
Class Validator

java.lang.Object
  |
  +--org.ephman.utils.Validator

public class Validator
extends java.lang.Object


Constructor Summary
Validator()
           
 
Method Summary
static void main(java.lang.String[] argv)
           
 void validate(java.io.Reader reader, java.lang.String dtdURI)
          validate - validates that XML read from the "reader"
 void validateXMLFile(java.lang.String fname)
          validate - validates that XML read from the "reader"
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Validator

public Validator()
Method Detail

main

public static void main(java.lang.String[] argv)

validateXMLFile

public void validateXMLFile(java.lang.String fname)
                     throws javax.xml.parsers.ParserConfigurationException,
                            java.io.FileNotFoundException,
                            java.io.IOException,
                            org.xml.sax.SAXException
validate - validates that XML read from the "reader"

Parameters:
fname - the name of the file to validate
Throws:
org.xml.sax.SAXParseException - - parse error - see the content of exception for detailed info.
javax.xml.parsers.ParserConfigurationException - - can't create DOM builder
java.io.IOException - - cannot read the input file
SAXEXecption - - some other parsing problem
java.io.FileNotFoundException
org.xml.sax.SAXException

validate

public void validate(java.io.Reader reader,
                     java.lang.String dtdURI)
              throws javax.xml.parsers.ParserConfigurationException,
                     java.io.FileNotFoundException,
                     java.io.IOException,
                     org.xml.sax.SAXException
validate - validates that XML read from the "reader"

Parameters:
reader - input XML is read from here
dtdURI - if no null, the URI of the DTD to which this XML is supposed to conform
Throws:
org.xml.sax.SAXParseException - - parse error - see the content of exception for detailed info.
javax.xml.parsers.ParserConfigurationException - - can't create DOM builder
java.io.IOException - - cannot read the input file
SAXEXecption - - some other parsing problem
java.io.FileNotFoundException
org.xml.sax.SAXException