FileDocCategorySizeDatePackage
DocumentImpl.javaAPI DocJava SE 5 API5320Fri Aug 26 14:55:50 BST 2005com.sun.org.apache.xerces.internal.impl.xs.dom

DocumentImpl

public class DocumentImpl extends CoreDocumentImpl
Our own document implementation, which knows how to create an element with line/column information
author
Sandy Gao, IBM
version
$Id: DocumentImpl.java,v 1.3 2002/11/20 00:49:47 twl Exp $

Fields Summary
protected DOMNodePool
fNodePool
Constructors Summary
public DocumentImpl()
Create a document

        super();
    
Methods Summary
public org.w3c.dom.AttrcreateAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String localName)
Create attribute node. If node pool is available use attribute node from the pool.

param
namespaceURI
param
qualifiedName
param
localName
return
a new attribute node
exception
DOMException

        if (fNodePool != null) {
            AttrNSImpl attr = fNodePool.getAttrNode();
            attr.setValues(this, namespaceURI, qualifiedName, localName);
            return attr;
        }
        return new AttrNSImpl(this, namespaceURI, qualifiedName, localName);
    
public org.w3c.dom.ElementcreateElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String localpart, int lineNum, int columnNum)
create an element with line/colument information

        if (fNodePool !=null) {
            ElementNSImpl element = fNodePool.getElementNode();
            element.setValues(this, namespaceURI, qualifiedName,
                                 localpart, lineNum, columnNum);
            return element;
        } 
        return new ElementNSImpl(this, namespaceURI, qualifiedName,
                                 localpart, lineNum, columnNum);
    
public org.w3c.dom.TextcreateTextNode(java.lang.String data)
Create a text node. If node pool is available use text node from the pool.

param
data
return
a usable TextNode

        if (fNodePool != null) {
            TextImpl text = fNodePool.getTextNode();
            text.setValues(this, data);
            return text;
        }
        return new TextImpl(this, data);