|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.japisoft.fastparser.node.SimpleNode | +--com.japisoft.fastparser.dom.NodeImpl | +--com.japisoft.fastparser.dom.DocumentImpl
Document
Field Summary |
Fields inherited from class com.japisoft.fastparser.dom.NodeImpl |
nameSpaceURI |
Fields inherited from class com.japisoft.fastparser.node.SimpleNode |
COMMENT_NODE, TAG_NODE, TEXT_NODE |
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 |
Constructor Summary | |
DocumentImpl(Document d)
|
Method Summary | |
Attr |
createAttribute(java.lang.String name)
Creates an Attr of the given name. |
Attr |
createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
|
CDATASection |
createCDATASection(java.lang.String data)
Creates a CDATASection node whose value is the specified
string. |
Comment |
createComment(java.lang.String data)
Creates a Comment node given the specified string. |
DocumentFragment |
createDocumentFragment()
Creates an empty DocumentFragment object. |
Element |
createElement(java.lang.String tagName)
Creates an element of the type specified. |
Element |
createElementNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
|
EntityReference |
createEntityReference(java.lang.String name)
Creates an EntityReference object. |
ProcessingInstruction |
createProcessingInstruction(java.lang.String target,
java.lang.String data)
Creates a ProcessingInstruction node given the specified
name and data strings. |
Text |
createTextNode(java.lang.String data)
Creates a Text node given the specified string. |
DocumentType |
getDoctype()
The Document Type Declaration (see DocumentType ) associated
with this document. |
Element |
getDocumentElement()
This is a convenience attribute that allows direct access to the child node that is the root element of the document. |
Element |
getElementById(java.lang.String elementId)
|
NodeList |
getElementsByTagName(java.lang.String tagname)
Returns a NodeList of all the Element s with a
given tag name in the order in which they would be encountered in a
preorder traversal of the Document tree. |
NodeList |
getElementsByTagNameNS(java.lang.String namespaceURI,
java.lang.String localName)
|
DOMImplementation |
getImplementation()
The DOMImplementation object that handles this document. |
Node |
importNode(Node importedNode,
boolean deep)
|
Methods inherited from class com.japisoft.fastparser.dom.NodeImpl |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getPreviousSibling, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNamespaceURI, setNodeValue, setOwnerDocument, setPrefix |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.w3c.dom.Node |
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getNextSibling, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, hasChildNodes, insertBefore, removeChild, replaceChild, setNodeValue |
Constructor Detail |
public DocumentImpl(Document d)
Method Detail |
public DocumentType getDoctype()
DocumentType
) associated
with this document. For HTML documents as well as XML documents without
a document type declaration this returns null
. The DOM Level
1 does not support editing the Document Type Declaration, therefore
docType
cannot be altered in any way.
getDoctype
in interface Document
public DOMImplementation getImplementation()
DOMImplementation
object that handles this document. A
DOM application may use objects from multiple implementations.
getImplementation
in interface Document
public Element getDocumentElement()
getDocumentElement
in interface Document
public Element createElement(java.lang.String tagName) throws DOMException
createElement
in interface Document
tagName
- The name of the element type to instantiate. For XML, this
is case-sensitive. For HTML, the tagName
parameter may
be provided in any case, but it must be mapped to the canonical
uppercase form by the DOM implementation.
Element
object.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character.public DocumentFragment createDocumentFragment()
DocumentFragment
object.
createDocumentFragment
in interface Document
DocumentFragment
.public Text createTextNode(java.lang.String data)
Text
node given the specified string.
createTextNode
in interface Document
data
- The data for the node.
Text
object.public Comment createComment(java.lang.String data)
Comment
node given the specified string.
createComment
in interface Document
data
- The data for the node.
Comment
object.public CDATASection createCDATASection(java.lang.String data) throws DOMException
CDATASection
node whose value is the specified
string.
createCDATASection
in interface Document
data
- The data for the CDATASection
contents.
CDATASection
object.
DOMException
- NOT_SUPPORTED_ERR: Raised if this document is an HTML document.public ProcessingInstruction createProcessingInstruction(java.lang.String target, java.lang.String data) throws DOMException
ProcessingInstruction
node given the specified
name and data strings.
createProcessingInstruction
in interface Document
target
- The target part of the processing instruction.data
- The data for the node.
ProcessingInstruction
object.
DOMException
- INVALID_CHARACTER_ERR: Raised if an invalid character is specified.
public Attr createAttribute(java.lang.String name) throws DOMException
Attr
of the given name. Note that the
Attr
instance can then be set on an Element
using the setAttribute
method.
createAttribute
in interface Document
name
- The name of the attribute.
Attr
object.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character.public EntityReference createEntityReference(java.lang.String name) throws DOMException
createEntityReference
in interface Document
name
- The name of the entity to reference.
EntityReference
object.
DOMException
- INVALID_CHARACTER_ERR: Raised if the specified name contains an
invalid character.
public NodeList getElementsByTagName(java.lang.String tagname)
NodeList
of all the Element
s with a
given tag name in the order in which they would be encountered in a
preorder traversal of the Document
tree.
getElementsByTagName
in interface Document
tagname
- The name of the tag to match on. The special value "*"
matches all tags.
NodeList
object containing all the matched
Element
s.public Node importNode(Node importedNode, boolean deep) throws DOMException
DOMException
public Element createElementNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
DOMException
public Attr createAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName) throws DOMException
DOMException
public NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
public Element getElementById(java.lang.String elementId)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |