|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.proteios.io.XMLValidator
public class XMLValidator
This class validates XML input (file, input stream, or SourceStream) against an XSD (XML Schema Definition) file. Based on Validate.java by Neeraj Bajaj, Sun Microsystems, in example code described here.
| Constructor Summary | |
|---|---|
XMLValidator()
|
|
| Method Summary | |
|---|---|
static Schema |
compileSchema(String xsdFilePath)
Parses the XSD schema file and returns in-memory representation of the schema. |
static boolean |
validate_w_error_output(String xsdFilePath,
InputStream xmlInputStream)
Validates an XML input stream against the schema in an XSD schema file. |
static boolean |
validate_w_error_output(String xsdFilePath,
StreamSource xmlStreamSource)
Validates an XML StreamSource against the schema in an XSD schema file. |
static boolean |
validate_w_error_output(String xsdFilePath,
String xmlFilePath)
Validates an XML file against the schema in an XSD schema file. |
static boolean |
validate(String xsdFilePath,
InputStream xmlInputStream)
Validates an XML input stream against the schema in an XSD schema file. |
static boolean |
validate(String xsdFilePath,
StreamSource xmlStreamSource)
Validates an XML file StreamSource against the schema in an XSD schema file. |
static boolean |
validate(String xsdFilePath,
String xmlFilePath)
Validates an XML file against the schema in an XSD schema file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public XMLValidator()
| Method Detail |
|---|
public static Schema compileSchema(String xsdFilePath)
throws SAXException
xsdFilePath - String with path to XSD file with validation schema.
SAXException
public static boolean validate(String xsdFilePath,
String xmlFilePath)
throws SAXException
xsdFilePath - String with path to XSD file with validation schema.xmlFilePath - String with path to XML file to validate.
SAXException
public static boolean validate(String xsdFilePath,
InputStream xmlInputStream)
throws SAXException
xsdFilePath - String with path to XSD file with validation schema.xmlInputStream - XML input stream to validate.
SAXException
public static boolean validate(String xsdFilePath,
StreamSource xmlStreamSource)
throws SAXException
xsdFilePath - String with path to XSD file with validation schema.xmlStreamSource - XML StreamSource to validate.
SAXException
public static boolean validate_w_error_output(String xsdFilePath,
String xmlFilePath)
throws SAXException
xsdFilePath - String with path to XSD file with validation schema.xmlFilePath - String with path to XML file to validate.
SAXException
public static boolean validate_w_error_output(String xsdFilePath,
InputStream xmlInputStream)
throws SAXException
xsdFilePath - String with path to XSD file with validation schema.xmlInputStream - XML input stream to validate.
SAXException
public static boolean validate_w_error_output(String xsdFilePath,
StreamSource xmlStreamSource)
throws SAXException
xsdFilePath - String with path to XSD file with validation schema.xmlStreamSource - XML StreamSource to validate.
SAXException
|
Last update: 2011-06-23 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||