public class DOMDocumentFactory extends DocumentFactory implements DOMImplementation
DOMDocumentFactory
is a factory of DOM4J objects
which implement the W3C DOM API.
Modifier and Type | Field and Description |
---|---|
protected static DOMDocumentFactory |
singleton
The Singleton instance
|
cache
Constructor and Description |
---|
DOMDocumentFactory() |
createAttribute, createDocument, createElement, createElement, createPattern, createQName, createQName, createQName, createQName, createQNameCache, createSingleton, createXPath, createXPath, createXPathFilter, createXPathFilter, getQNames, getXPathNamespaceURIs, init, intern, setXPathNamespaceURIs
protected static transient DOMDocumentFactory singleton
public DOMDocumentFactory()
public static DocumentFactory getInstance()
Access to the singleton instance of this factory.
public Document createDocument()
createDocument
in class DocumentFactory
public DocumentType createDocType(String name, String publicId, String systemId)
createDocType
in class DocumentFactory
public Element createElement(QName qname)
createElement
in class DocumentFactory
public Element createElement(QName qname, int attributeCount)
public Attribute createAttribute(Element owner, QName qname, String value)
createAttribute
in class DocumentFactory
public CDATA createCDATA(String text)
createCDATA
in class DocumentFactory
public Comment createComment(String text)
createComment
in class DocumentFactory
public Text createText(String text)
createText
in class DocumentFactory
public Entity createEntity(String name)
public Entity createEntity(String name, String text)
createEntity
in class DocumentFactory
public Namespace createNamespace(String prefix, String uri)
createNamespace
in class DocumentFactory
public ProcessingInstruction createProcessingInstruction(String target, String data)
createProcessingInstruction
in class DocumentFactory
public ProcessingInstruction createProcessingInstruction(String target, Map data)
createProcessingInstruction
in class DocumentFactory
public boolean hasFeature(String feature, String version)
DOMImplementation
hasFeature
in interface DOMImplementation
true
if the feature is implemented in the
specified version, false
otherwise.public DocumentType createDocumentType(String qualifiedName, String publicId, String systemId) throws DOMException
DOMImplementation
DocumentType
node. Entity declarations
and notations are not made available. Entity reference expansions and
default attribute additions do not occur. It is expected that a
future version of the DOM will provide a way for populating a
DocumentType
.
createDocumentType
in interface DOMImplementation
DocumentType
node with
Node.ownerDocument
set to null
.DOMException
- INVALID_CHARACTER_ERR: Raised if the specified qualified name
contains an illegal character.
qualifiedName
is
malformed.public Document createDocument(String namespaceURI, String qualifiedName, DocumentType documentType) throws DOMException
DOMImplementation
Document
object of the specified type with
its document element. HTML-only DOM implementations do not need to
implement this method.createDocument
in interface DOMImplementation
Document
object.DOMException
- 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.protected DocumentType asDocumentType(DocumentType documentType)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses