Save This Page
Home » dom4j-1.6.1 » org.dom4j » [javadoc | source]
org.dom4j
public class: DocumentFactory [javadoc | source]
java.lang.Object
   org.dom4j.DocumentFactory

All Implemented Interfaces:
    Serializable

Direct Known Subclasses:
    DOMDocumentFactory, NonLazyDocumentFactory, IndexedDocumentFactory, DatatypeDocumentFactory, BeanDocumentFactory, DatatypeElementFactory, LDocumentFactory, UserDataDocumentFactory

DocumentFactory is a collection of factory methods to allow easy custom building of DOM4J trees. The default tree that is built uses a doubly linked tree.

The tree built allows full XPath expressions from anywhere on the tree.

Field Summary
protected transient  QNameCache cache     
Constructor:
 public DocumentFactory() 
Method from org.dom4j.DocumentFactory Summary:
createAttribute,   createAttribute,   createCDATA,   createComment,   createDocType,   createDocument,   createDocument,   createDocument,   createElement,   createElement,   createElement,   createEntity,   createNamespace,   createPattern,   createProcessingInstruction,   createProcessingInstruction,   createQName,   createQName,   createQName,   createQName,   createQNameCache,   createSingleton,   createText,   createXPath,   createXPath,   createXPathFilter,   createXPathFilter,   getInstance,   getQNames,   getXPathNamespaceURIs,   init,   intern,   setXPathNamespaceURIs
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.dom4j.DocumentFactory Detail:
 public Attribute createAttribute(Element owner,
    QName qname,
    String value) 
 public Attribute createAttribute(Element owner,
    String name,
    String value) 
 public CDATA createCDATA(String text) 
 public Comment createComment(String text) 
 public DocumentType createDocType(String name,
    String publicId,
    String systemId) 
 public Document createDocument() 
 public Document createDocument(String encoding) 
    DOCUMENT ME!
 public Document createDocument(Element rootElement) 
 public Element createElement(QName qname) 
 public Element createElement(String name) 
 public Element createElement(String qualifiedName,
    String namespaceURI) 
 public Entity createEntity(String name,
    String text) 
 public Namespace createNamespace(String prefix,
    String uri) 
 public Pattern createPattern(String xpathPattern) 

    createPattern parses the given XPath expression to create an XSLT style Pattern instance which can then be used in an XSLT processing model.

 public ProcessingInstruction createProcessingInstruction(String target,
    String data) 
 public ProcessingInstruction createProcessingInstruction(String target,
    Map data) 
 public QName createQName(String localName) 
 public QName createQName(String localName,
    Namespace namespace) 
 public QName createQName(String qualifiedName,
    String uri) 
 public QName createQName(String name,
    String prefix,
    String uri) 
 protected QNameCache createQNameCache() 
    Factory method to create the QNameCache. This method should be overloaded if you wish to use your own derivation of QName.
 protected static DocumentFactory createSingleton(String className) 

    createSingleton creates the singleton instance from the given class name.

 public Text createText(String text) 
 public XPath createXPath(String xpathExpression) throws InvalidXPathException 

    createXPath parses an XPath expression and creates a new XPath XPath instance.

 public XPath createXPath(String xpathExpression,
    VariableContext variableContext) 

    createXPath parses an XPath expression and creates a new XPath XPath instance.

 public NodeFilter createXPathFilter(String xpathFilterExpression) 

    createXPathFilter parses a NodeFilter from the given XPath filter expression. XPath filter expressions occur within XPath expressions such as self::node()[ filterExpression ]

 public NodeFilter createXPathFilter(String xpathFilterExpression,
    VariableContext variableContext) 

    createXPathFilter parses a NodeFilter from the given XPath filter expression. XPath filter expressions occur within XPath expressions such as self::node()[ filterExpression ]

 public static synchronized DocumentFactory getInstance() 

    Access to singleton implementation of DocumentFactory which is used if no DocumentFactory is specified when building using the standard builders.

 public List getQNames() 
    Returns a list of all the QName instances currently used by this document factory
 public Map getXPathNamespaceURIs() 
    DOCUMENT ME!
 protected  void init() 
 protected QName intern(QName qname) 
    DOCUMENT ME!
 public  void setXPathNamespaceURIs(Map namespaceURIs) 
    Sets the namespace URIs to be used by XPath expressions created by this factory or by nodes associated with this factory. The keys are namespace prefixes and the values are namespace URIs.