|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.idom.impl.AbstractItem
org.zkoss.idom.impl.AbstractGroup
org.zkoss.idom.Document
public class Document
Represents Document which is also W3C/DOM's document, ie, org.w3c.dom.Document.
Element,
Serialized Form| Nested Class Summary | |
|---|---|
protected class |
Document.ChildArray
|
| Nested classes/interfaces inherited from class org.zkoss.idom.impl.AbstractGroup |
|---|
AbstractGroup.ElementMap |
| Field Summary |
|---|
| Fields inherited from class org.zkoss.idom.impl.AbstractGroup |
|---|
_children |
| Fields inherited from interface org.zkoss.idom.Item |
|---|
FIND_BY_PREFIX, FIND_BY_REGEX, FIND_BY_TAGNAME, FIND_IGNORE_CASE, FIND_RECURSIVE |
| Constructor Summary | |
|---|---|
Document()
Constructor. |
|
Document(Element root)
Constructor. |
|
Document(Element root,
DocType dt)
Constructor. |
|
| Methods inherited from class org.zkoss.idom.impl.AbstractGroup |
|---|
anyElement, appendChild, clone, coalesce, detachChildren, getChildNodes, getChildren, getElement, getElement, getElementIndex, getElementIndex, getElementNames, getElements, getElements, getElements, getElementValue, getElementValue, getFirstChild, getLastChild, hasChildNodes, insertBefore, removeChild, replaceChild |
| Methods inherited from class org.zkoss.idom.impl.AbstractItem |
|---|
cloneNode, compareDocumentPosition, detach, equals, getAttributes, getBaseURI, getDocument, getFeature, getLocalName, getLocator, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParent, getParentNode, getPrefix, getPreviousSibling, getText, getTextContent, getUserData, hasAttributes, hashCode, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, match, normalize, setLocator, setName, setNodeValue, setParent, setPrefix, setText, setTextContent, setUserData |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
|---|
appendChild, cloneNode, compareDocumentPosition, getAttributes, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, getTextContent, getUserData, hasAttributes, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
| Methods inherited from interface org.zkoss.idom.Item |
|---|
detach, getDocument, getLocator, getParent, getText, setLocator, setName, setParent, setText |
| Constructor Detail |
|---|
public Document(Element root,
DocType dt)
public Document(Element root)
public Document()
| Method Detail |
|---|
public final Element getRootElement()
public final void setRootElement(Element root)
public final DocType getDocType()
public final void setDocType(DocType docType)
protected final List<Item> newChildren()
AbstractGroupThe default implementation obeys the sematic of Element, i.e., it doen't allow any child that cannot be a child of Element.
For performance issue, we introduced a map to improve the search speed for Element node associated with a tag name.
newChildren in class AbstractGrouppublic final String getName()
Item
getName in interface ItemNamespaceable.getTagName()public final short getNodeType()
getNodeType in interface Nodepublic final DocumentType getDoctype()
getDoctype in interface Documentpublic final Element getDocumentElement()
getDocumentElement in interface Documentpublic final DOMImplementation getImplementation()
getImplementation in interface Documentpublic final Element createElement(String lname)
createElement in interface Document
public final Element createElementNS(String nsURI,
String tname)
createElementNS in interface Documentpublic final Attr createAttribute(String lname)
createAttribute in interface Document
public final Attr createAttributeNS(String nsURI,
String tname)
createAttributeNS in interface Documentpublic final DocumentFragment createDocumentFragment()
createDocumentFragment in interface Documentpublic final Text createTextNode(String data)
createTextNode in interface Documentpublic final Comment createComment(String data)
createComment in interface Documentpublic final CDATASection createCDATASection(String data)
createCDATASection in interface Document
public final ProcessingInstruction createProcessingInstruction(String target,
String data)
createProcessingInstruction in interface Documentpublic final EntityReference createEntityReference(String name)
createEntityReference in interface Documentpublic final NodeList getElementsByTagName(String tname)
Unlike other implementations (Xerces or Crimson), the returned list is a snapshot of the current tree -- not a "live" representation.
getElementsByTagName in interface Document
public final NodeList getElementsByTagNameNS(String nsURI,
String lname)
Unlike other implementations (Xerces or Crimson), the returned list is a snapshot of the current tree -- not a "live" representation.
getElementsByTagNameNS in interface Documentpublic final Element getElementById(String elementId)
getElementById in interface Document
public final Node importNode(Node importedNode,
boolean deep)
importNode in interface Documentpublic String getInputEncoding()
getInputEncoding in interface Documentpublic String getXmlEncoding()
getXmlEncoding in interface Documentpublic boolean getXmlStandalone()
getXmlStandalone in interface Document
public void setXmlStandalone(boolean xmlStandalone)
throws DOMException
setXmlStandalone in interface DocumentDOMExceptionpublic String getXmlVersion()
getXmlVersion in interface Document
public void setXmlVersion(String xmlVersion)
throws DOMException
setXmlVersion in interface DocumentDOMExceptionpublic boolean getStrictErrorChecking()
getStrictErrorChecking in interface Documentpublic void setStrictErrorChecking(boolean strictErrorChecking)
setStrictErrorChecking in interface Documentpublic String getDocumentURI()
getDocumentURI in interface Documentpublic void setDocumentURI(String documentURI)
setDocumentURI in interface Document
public Node adoptNode(Node source)
throws DOMException
adoptNode in interface DocumentDOMExceptionpublic DOMConfiguration getDomConfig()
getDomConfig in interface Documentpublic void normalizeDocument()
normalizeDocument in interface Document
public Node renameNode(Node n,
String namespaceURI,
String qualifiedName)
throws DOMException
renameNode in interface DocumentDOMExceptionpublic final String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||