Package com.jcabi.xml
Class XSDDocument
- java.lang.Object
 - 
- com.jcabi.xml.XSDDocument
 
 
- 
- 
Constructor Summary
Constructors Constructor Description XSDDocument(XML src)Public ctor, from XSD as a source.XSDDocument(File file)Public ctor, from file.XSDDocument(InputStream stream)Public ctor, from XSD as an input stream.XSDDocument(String src)Public ctor, from XSD as a string.XSDDocument(URI uri)Public ctor, from URI.XSDDocument(URL url)Public ctor, from URL.XSDDocument(Path file)Public ctor, from file. 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static XSDmake(InputStream stream)Make an instance of XSD schema without I/O exceptions.static XSDmake(URL url)Make an instance of XSD schema without I/O exceptions.StringtoString()Collection<SAXParseException>validate(Source xml)Validate XML. 
 - 
 
- 
- 
Constructor Detail
- 
XSDDocument
public XSDDocument(XML src)
Public ctor, from XSD as a source.- Parameters:
 src- XSD document body
 
- 
XSDDocument
public XSDDocument(String src)
Public ctor, from XSD as a string.- Parameters:
 src- XSD document body
 
- 
XSDDocument
public XSDDocument(URL url) throws IOException
Public ctor, from URL.- Parameters:
 url- Location of document- Throws:
 IOException- If fails to read- Since:
 - 0.7.4
 
 
- 
XSDDocument
public XSDDocument(Path file) throws FileNotFoundException
Public ctor, from file.- Parameters:
 file- Location of document- Throws:
 FileNotFoundException- If fails to read- Since:
 - 0.21
 
 
- 
XSDDocument
public XSDDocument(File file) throws FileNotFoundException
Public ctor, from file.- Parameters:
 file- Location of document- Throws:
 FileNotFoundException- If fails to read- Since:
 - 0.21
 
 
- 
XSDDocument
public XSDDocument(URI uri) throws IOException
Public ctor, from URI.- Parameters:
 uri- Location of document- Throws:
 IOException- If fails to read- Since:
 - 0.15
 
 
- 
XSDDocument
public XSDDocument(InputStream stream)
Public ctor, from XSD as an input stream.- Parameters:
 stream- XSD input stream
 
 - 
 
- 
Method Detail
- 
make
public static XSD make(InputStream stream)
Make an instance of XSD schema without I/O exceptions.This factory method is useful when you need to create an instance of XSD schema as a static final variable. In this case you can't catch an exception but this method can help, for example:
class Foo { private static final XSD SCHEMA = XSDDocument.make( Foo.class.getResourceAsStream("my-schema.xsd") ); }- Parameters:
 stream- Input stream- Returns:
 - XSD schema
 
 
- 
make
public static XSD make(URL url)
Make an instance of XSD schema without I/O exceptions.- Parameters:
 url- URL with content- Returns:
 - XSD schema
 - Since:
 - 0.7.4
 - See Also:
 make(InputStream)
 
- 
validate
public Collection<SAXParseException> validate(Source xml)
Description copied from interface:XSDValidate XML. 
 - 
 
 -