public class XMLDOMImplementation extends java.lang.Object implements DOMImplementation, java.io.Serializable, DOMImplementationLS
MODE_ASYNCHRONOUS, MODE_SYNCHRONOUS
Constructor and Description |
---|
XMLDOMImplementation() |
Modifier and Type | Method and Description |
---|---|
Document |
createDocument(ContentManager contentMgr)
Creates an LAZY/Scalable DOM currently only support with XTI Format.
|
Document |
createDocument(InfosetReader reader)
Creates an LAZY/Scalable DOM with optional plug-in XML data.
|
Document |
createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, DocumentType doctype)
Creates an empty DocumentType node.
|
DocumentType |
createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId)
Creates an XML Document object of the specified type with its document element
|
LSInput |
createLSInput()
Create a new empty input source object where
LSInput.characterStream , LSInput.byteStream , LSInput.stringData LSInput.systemId , LSInput.publicId , LSInput.baseURI , and LSInput.encoding are null, and LSInput.certifiedText is false. |
LSOutput |
createLSOutput()
Create a new empty output destination object where
LSOutput.characterStream , LSOutput.byteStream , LSOutput.systemId , LSOutput.encoding are null. |
LSParser |
createLSParser(short mode, java.lang.String schemaType)
Create a new
LSParser . |
LSSerializer |
createLSSerializer()
Create a new
LSSerializer object. |
boolean |
hasFeature(java.lang.String feature, java.lang.String version)
Test if the DOM implementation implements a specific feature.
|
void |
setAttribute(java.lang.String name, java.lang.Object value)
Allows the user to set specific attributes on the underlying implementation.
|
void |
setFeature(java.lang.String feature)
Sets a specified feature
|
public boolean hasFeature(java.lang.String feature, java.lang.String version)
hasFeature
in interface DOMImplementation
feature
- ,implementation checkedpublic DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId) throws DOMException
createDocumentType
in interface DOMImplementation
qualifiedName
- Qualified name of document type to be createdpublicId
- Public identifier of the document type object to be createdsystemId
- System identifier of the document type object to be createdDOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character NAMESPACE_ERR: Raised if the qualifiedName is malformed.public Document createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, DocumentType doctype) throws DOMException
createDocument
in interface DOMImplementation
qualifiedName
- QName of the root element or nullnamespaceURI
- Namespace of the root element or nulldtd
- DocumentType of the Document object createdDOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name contains an illegal character.qualifiedName
is malformed, if the qualifiedName
has a prefix and the namespaceURI
is null
, or if the qualifiedName
has a prefix that is "xml" and the namespaceURI
is different from " http://www.w3.org/XML/1998/namespace" .doctype
has already been used with a different document or was created from a different implementation.public Document createDocument(InfosetReader reader) throws DOMException
InfosetReader
- The interface to plug-in XML. If null, an empty DOM will be createdDOMException
public Document createDocument(ContentManager contentMgr) throws DOMException
ContentManager
-DOMException
public void setFeature(java.lang.String feature) throws DOMException
feature
- the DOM featureDOMException
- if the feature could not be setpublic LSParser createLSParser(short mode, java.lang.String schemaType) throws DOMException
LSParser
. The newly constructed parser may then be configured by means of its DOMConfiguration
object, and used to parse documents by means of its parse
method.createLSParser
in interface DOMImplementationLS
mode
- The mode
argument is either MODE_SYNCHRONOUS
or MODE_ASYNCHRONOUS
, if mode
is MODE_SYNCHRONOUS
then the LSParser
that is created will operate in synchronous mode, if it's MODE_ASYNCHRONOUS
then the LSParser
that is created will operate in asynchronous mode.schemaType
- An absolute URI representing the type of the schema language used during the load of a Document
using the newly created LSParser
. Note that no lexical checking is done on the absolute URI. In order to create a LSParser
for any kind of schema types (i.e. the LSParser will be free to use any schema found), use the value null
.LSParser
object. This LSParser
is either synchronous or asynchronous depending on the value of the mode
argument.DOMException
- NOT_SUPPORTED_ERR: Raised if the requested mode or schema type is NOTE: DOM LS interfaces are pre W3C Recommendation and are subject to change from release to relase until W3C Recommendation. Therefore this method is subject to change.public LSSerializer createLSSerializer()
LSSerializer
object.createLSSerializer
in interface DOMImplementationLS
LSSerializer
object.
Note: By default, the newly created LSSerializer
has no DOMErrorHandler
, i.e. the value of the "error-handler"
configuration parameter is null
. However, implementations may provide a default error handler at creation time. In that case, the initial value of the "error-handler"
configuration parameter on the new created LSSerializer
contains a reference to the default error handler. NOTE: DOM LS interfaces are pre W3C Recommendation and are subject to change from release to relase until W3C Recommendation. Therefore this method is subject to change.
public LSInput createLSInput()
LSInput.characterStream
, LSInput.byteStream
, LSInput.stringData
LSInput.systemId
, LSInput.publicId
, LSInput.baseURI
, and LSInput.encoding
are null, and LSInput.certifiedText
is false.createLSInput
in interface DOMImplementationLS
public LSOutput createLSOutput()
LSOutput.characterStream
, LSOutput.byteStream
, LSOutput.systemId
, LSOutput.encoding
are null.createLSOutput
in interface DOMImplementationLS
public void setAttribute(java.lang.String name, java.lang.Object value) throws java.lang.IllegalArgumentException
name
- The name of the attribute.value
- The value of the attribute.java.lang.IllegalArgumentException
- thrown if the underlying implementation doesn't recognize the attribute.