com.redspr.beanldom.stree
Class DocumentImpl
java.lang.Object
|
+--com.redspr.beanldom.stree.NodeImpl
|
+--com.redspr.beanldom.stree.DocumentImpl
- All Implemented Interfaces:
- Document, Node
- public class DocumentImpl
- extends NodeImpl
- implements Document
Document simply points to element representing the root object.
Provides construction methods for new LDOM wrapper document.
XXX might be better to use a factory.
- Author:
- Sam Hough
Fields inherited from interface org.w3c.dom.Node |
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE |
Methods inherited from class com.redspr.beanldom.stree.NodeImpl |
appendChild, cloneNode, getAttributes, getChildNodes, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, hasAttributes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix, toString |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeValue, getParentNode, getPrefix, getPreviousSibling, hasAttributes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix |
DocumentImpl
public DocumentImpl(String rootName)
appendObject
public void appendObject(String name,
Object target)
- append an object to the root element
getFirstChild
public Node getFirstChild()
- Specified by:
getFirstChild
in interface Node
- Overrides:
getFirstChild
in class NodeImpl
getNodeName
public String getNodeName()
- Specified by:
getNodeName
in interface Node
getNodeType
public short getNodeType()
- Specified by:
getNodeType
in interface Node
getDocumentElement
public Element getDocumentElement()
- Specified by:
getDocumentElement
in interface Document
getOwnerDocument
public Document getOwnerDocument()
- Specified by:
getOwnerDocument
in interface Node
hasChildNodes
public boolean hasChildNodes()
- Specified by:
hasChildNodes
in interface Node
- Overrides:
hasChildNodes
in class NodeImpl
getDoctype
public DocumentType getDoctype()
- Specified by:
getDoctype
in interface Document
getImplementation
public DOMImplementation getImplementation()
- Specified by:
getImplementation
in interface Document
createElement
public Element createElement(String tagName)
- Specified by:
createElement
in interface Document
createDocumentFragment
public DocumentFragment createDocumentFragment()
- Specified by:
createDocumentFragment
in interface Document
createTextNode
public Text createTextNode(String data)
- Specified by:
createTextNode
in interface Document
createComment
public Comment createComment(String data)
- Specified by:
createComment
in interface Document
createCDATASection
public CDATASection createCDATASection(String data)
- Specified by:
createCDATASection
in interface Document
createProcessingInstruction
public ProcessingInstruction createProcessingInstruction(String target,
String data)
- Specified by:
createProcessingInstruction
in interface Document
createAttribute
public Attr createAttribute(String name)
- Specified by:
createAttribute
in interface Document
createEntityReference
public EntityReference createEntityReference(String name)
- Specified by:
createEntityReference
in interface Document
getElementsByTagName
public NodeList getElementsByTagName(String tagname)
- Specified by:
getElementsByTagName
in interface Document
importNode
public Node importNode(Node importedNode,
boolean deep)
- Specified by:
importNode
in interface Document
createElementNS
public Element createElementNS(String namespaceURI,
String qualifiedName)
- Specified by:
createElementNS
in interface Document
createAttributeNS
public Attr createAttributeNS(String namespaceURI,
String qualifiedName)
- Specified by:
createAttributeNS
in interface Document
getElementsByTagNameNS
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
- Specified by:
getElementsByTagNameNS
in interface Document
getElementById
public Element getElementById(String elementId)
- Specified by:
getElementById
in interface Document