Java Reference
In-Depth Information
private static DocumentBuilder createDocumentBuilder(
String...schemas) {
...
//business as usual
factory.setAttribute(SCHEMA_SOURCE_PROP, schemas);
It is important to note that I have been using strings to refer to the paths of schema documents,
but that is not your only option. You can use any of the following to specify the value you pass
to factory.setAttribute :
▪ A string pointing to the schema URI
▪ An InputStream you have previously used to capture the schema contents
▪ A SAX InputSource
▪ A File object
▪ An array containing elements of any of these types
Search WWH ::




Custom Search