org.sbml.jsbml.util
public interface DocumentFactory
Modifier and Type | Method and Description |
---|---|
Document |
create(InputStream byteStream,
boolean namespaceAware)
Creates an XML DOM document by parsing the content of the specified byte
stream as XML, using a nonvalidating parser.
|
Document |
create(InputStream byteStream,
Object[] schemas,
ErrorHandler handler)
Creates an XML DOM document by parsing the content of the specified byte
stream as XML, using a validating parser.
|
Document |
create(Reader characterStream,
boolean namespaceAware)
Creates an XML DOM document by parsing the content of the specified
character stream as XML, using a nonvalidating parser.
|
Document |
create(Reader characterStream,
Object[] schemas,
ErrorHandler handler)
Creates an XML DOM document by parsing the content of the specified
character stream as XML, using a validating parser.
|
Document create(InputStream byteStream, boolean namespaceAware) throws SAXException
byteStream
- The byte stream whose content is parsed as XML to create the
XML DOM document.namespaceAware
- A flag to indicate whether the parser should know about
namespaces or not.org.w3c.dom.Document
instance representing the
XML DOM document created from the byteStream
XML
content.SAXException
Document create(InputStream byteStream, Object[] schemas, ErrorHandler handler) throws SAXException
byteStream
- The byte stream whose content is parsed as XML to create the
XML DOM document.schemas
- An optional array of either java.io.File
instances containing the abstract pathnames, or of
java.io.String
instances containing the URIs,
pointing to the schemas to use in the validation process. If
set to null
, the schemas defined in the data set
will be used. If set to null
and no schemas are
found in the data set, an exception is most likely to be
thrown by the underlying implementation.handler
- The error handler to be used to report errors occurred while
parsing the byteStream
XML content. Setting this
to null
will result in the underlying
implementation using it's own default implementation and
behavior.org.w3c.dom.Document
instance representing the
XML DOM document created from the byteStream
XML
content.SAXException
Document create(Reader characterStream, boolean namespaceAware) throws SAXException
characterStream
- The character stream whose content is parsed as XML to create
the XML DOM document.namespaceAware
- A flag to indicate whether the parser should know about
namespaces or not.org.w3c.dom.Document
instance representing the
XML DOM document created from the characterStream
XML content.SAXException
Document create(Reader characterStream, Object[] schemas, ErrorHandler handler)
characterStream
- The character stream whose content is parsed as XML to create
the XML DOM document.schemas
- An optional array of either java.io.File
instances containing the abstract pathnames, or of
java.io.String
instances containing the URIs,
pointing to the schemas to use in the validation process. If
set to null
, the schemas defined in the data set
will be used. If set to null
and no schemas are
found in the data set, an exception is most likely to be
thrown by the underlying implementation.handler
- The error handler to be used to report errors occurred while
parsing the characterStream
XML content. Setting
this to null
will result in the underlying
implementation using it's own default implementation and
behavior.org.w3c.dom.Document
instance representing the
XML DOM document created from the characterStream
XML content.