public class ValidationXsdUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CATALOG_FILENAME
Filename of the catalog file ; should be found in the classpath.
|
static String |
HTTP_WWW_W3_ORG_XML_XML_SCHEMA_V1_1 |
static String |
RNG_FACTORY |
static String |
RNG_PROPERTY_KEY |
Constructor and Description |
---|
ValidationXsdUtils() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkFileRNG(InputStream xmlFile,
File xsdFile) |
boolean |
checkFileXSD(InputStream xmlFile,
File xsdFile) |
boolean |
checkWithXSD(InputStream xmlFile,
String xsdFile) |
static ValidationXsdUtils |
getInstance() |
public static final String RNG_FACTORY
public static final String RNG_PROPERTY_KEY
public static final String HTTP_WWW_W3_ORG_XML_XML_SCHEMA_V1_1
public static final String CATALOG_FILENAME
public static ValidationXsdUtils getInstance()
public boolean checkWithXSD(InputStream xmlFile, String xsdFile) throws SAXException, IOException, XMLStreamException
xmlFile
- the file to validatexsdFile
- the xsd schema to validate with the fileFileNotFoundException
- if the file is not foundXMLStreamException
- if it couldnt create an xml stream readerSAXException
- if the file is not valid with the XSD, or the file is not an xml fileIOException
- if the schema file could not be foundpublic boolean checkFileXSD(InputStream xmlFile, File xsdFile) throws SAXException, IOException, XMLStreamException
xmlFile
- xsdFile
- SAXException
IOException
XMLStreamException
public boolean checkFileRNG(InputStream xmlFile, File xsdFile) throws SAXException, IOException
xmlFile
- xsdFile
- SAXException
IOException
Copyright © 2019 Vitam. All rights reserved.