Package org.dom4j.dom
Class DOMDocumentFactory
- java.lang.Object
-
- org.dom4j.DocumentFactory
-
- org.dom4j.dom.DOMDocumentFactory
-
- All Implemented Interfaces:
java.io.Serializable
,org.w3c.dom.DOMImplementation
public class DOMDocumentFactory extends DocumentFactory implements org.w3c.dom.DOMImplementation
DOMDocumentFactory
is a factory of DOM4J objects which implement the W3C DOM API.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.dom4j.DocumentFactory
cache
-
-
Constructor Summary
Constructors Constructor Description DOMDocumentFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DOMDocumentType
asDocumentType(org.w3c.dom.DocumentType docType)
Attribute
createAttribute(Element owner, QName qname, java.lang.String value)
CDATA
createCDATA(java.lang.String text)
Comment
createComment(java.lang.String text)
DocumentType
createDocType(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
Document
createDocument()
org.w3c.dom.Document
createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType docType)
org.w3c.dom.DocumentType
createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId)
Element
createElement(QName qname)
Element
createElement(QName qname, int attributeCount)
Entity
createEntity(java.lang.String name)
Entity
createEntity(java.lang.String name, java.lang.String text)
Namespace
createNamespace(java.lang.String prefix, java.lang.String uri)
ProcessingInstruction
createProcessingInstruction(java.lang.String target, java.lang.String data)
ProcessingInstruction
createProcessingInstruction(java.lang.String target, java.util.Map<java.lang.String,java.lang.String> data)
Text
createText(java.lang.String text)
java.lang.Object
getFeature(java.lang.String feature, java.lang.String version)
static DocumentFactory
getInstance()
Access to the singleton instance of this factory.boolean
hasFeature(java.lang.String feat, java.lang.String version)
-
Methods inherited from class org.dom4j.DocumentFactory
createAttribute, createDocument, createDocument, createElement, createElement, createPattern, createQName, createQName, createQName, createQName, createQNameCache, createSingleton, createXPath, createXPath, createXPathFilter, createXPathFilter, getQNames, getXPathNamespaceURIs, init, intern, setXPathNamespaceURIs
-
-
-
-
Method Detail
-
getInstance
public static DocumentFactory getInstance()
Access to the singleton instance of this factory.
- Returns:
- the default singleon instance
-
createDocument
public Document createDocument()
- Overrides:
createDocument
in classDocumentFactory
-
createDocType
public DocumentType createDocType(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
- Overrides:
createDocType
in classDocumentFactory
-
createElement
public Element createElement(QName qname)
- Overrides:
createElement
in classDocumentFactory
-
createAttribute
public Attribute createAttribute(Element owner, QName qname, java.lang.String value)
- Overrides:
createAttribute
in classDocumentFactory
-
createCDATA
public CDATA createCDATA(java.lang.String text)
- Overrides:
createCDATA
in classDocumentFactory
-
createComment
public Comment createComment(java.lang.String text)
- Overrides:
createComment
in classDocumentFactory
-
createText
public Text createText(java.lang.String text)
- Overrides:
createText
in classDocumentFactory
-
createEntity
public Entity createEntity(java.lang.String name)
-
createEntity
public Entity createEntity(java.lang.String name, java.lang.String text)
- Overrides:
createEntity
in classDocumentFactory
-
createNamespace
public Namespace createNamespace(java.lang.String prefix, java.lang.String uri)
- Overrides:
createNamespace
in classDocumentFactory
-
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data)
- Overrides:
createProcessingInstruction
in classDocumentFactory
-
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(java.lang.String target, java.util.Map<java.lang.String,java.lang.String> data)
- Overrides:
createProcessingInstruction
in classDocumentFactory
-
hasFeature
public boolean hasFeature(java.lang.String feat, java.lang.String version)
- Specified by:
hasFeature
in interfaceorg.w3c.dom.DOMImplementation
-
createDocumentType
public org.w3c.dom.DocumentType createDocumentType(java.lang.String qualifiedName, java.lang.String publicId, java.lang.String systemId) throws org.w3c.dom.DOMException
- Specified by:
createDocumentType
in interfaceorg.w3c.dom.DOMImplementation
- Throws:
org.w3c.dom.DOMException
-
createDocument
public org.w3c.dom.Document createDocument(java.lang.String namespaceURI, java.lang.String qualifiedName, org.w3c.dom.DocumentType docType) throws org.w3c.dom.DOMException
- Specified by:
createDocument
in interfaceorg.w3c.dom.DOMImplementation
- Throws:
org.w3c.dom.DOMException
-
asDocumentType
protected DOMDocumentType asDocumentType(org.w3c.dom.DocumentType docType)
-
getFeature
public java.lang.Object getFeature(java.lang.String feature, java.lang.String version)
- Specified by:
getFeature
in interfaceorg.w3c.dom.DOMImplementation
-
-