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.
|
Constructor and Description |
---|
ValidationXsdUtils() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkFileRNG(InputStream xmlFile,
File xsdFile) |
boolean |
checkFileXSD(InputStream xmlFile,
File xsdFile) |
static boolean |
checkWithXSD(InputStream xmlFile,
String xsdFile) |
public static final String CATALOG_FILENAME
public static 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 static boolean checkFileRNG(InputStream xmlFile, File xsdFile) throws XMLStreamException, SAXException, IOException
xmlFile
- xsdFile
- SAXException
IOException
XMLStreamException
Copyright © 2018 Vitam. All rights reserved.