|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--com.caucho.xml.QAbstractNode
|
+--com.caucho.xml.QNode
QNode represents any node that can have children.
| Fields inherited from class com.caucho.xml.QAbstractNode |
L |
| 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 | |
QNode()
|
|
| Method Summary | |
Node |
appendChild(Node newNode)
Adds the node newChild to the end of the list of children
of this node. |
boolean |
checkValid()
For testing... |
boolean |
equals(Node arg,
boolean deep)
|
boolean |
equals(java.lang.Object arg)
|
NamedNodeMap |
getAttributes()
A NamedNodeMap containing the attributes of this node (if
it is an Element) or null otherwise. |
NodeList |
getChildNodes()
Returns a node list of the children. |
Node |
getFirstChild()
The first child of this node. |
Node |
getLastChild()
The last child of this node. |
int |
getLength()
Returns the number of children. |
QAbstractNode |
getNextPreorder()
|
Node |
getNextSibling()
The node immediately following this node. |
java.lang.String |
getNodeValue()
The value of this node, depending on its type; see the table above. |
Node |
getPreviousSibling()
The node immediately preceding this node. |
boolean |
hasChildNodes()
Returns whether this node has any children. |
Node |
insertBefore(Node newChild,
Node refChild)
Inserts the node newChild before the existing child node
refChild. |
Node |
item(int index)
Returns the child with the given index. |
void |
normalize()
Puts all Text nodes in the full depth of the sub-tree
underneath this Node, including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments,
processing instructions, CDATA sections, and entity references)
separates Text nodes, i.e., there are neither adjacent
Text nodes nor empty Text nodes. |
Node |
removeChild(Node oldChild)
Removes the child node indicated by oldChild from the list
of children, and returns it. |
Node |
replaceChild(Node newChild,
Node refChild)
Replaces the child node oldChild with newChild
in the list of children, and returns the oldChild node. |
void |
setNodeValue(java.lang.String value)
The value of this node, depending on its type; see the table above. |
| Methods inherited from class com.caucho.xml.QAbstractNode |
cloneNode, getCanonicalName, getColumn, getFilename, getLine, getLocalName, getNamespaceURI, getNextContent, getOwnerDocument, getParentNode, getPrefix, getPreviousContent, getTextValue, hasAttributes, hasContent, isSupported, print, printHtml, printPretty, setLocation, setPrefix, supports |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.w3c.dom.Node |
getNodeName, getNodeType |
| Constructor Detail |
public QNode()
| Method Detail |
public java.lang.String getNodeValue()
Nodenull, setting it has no effect.getNodeValue in class QAbstractNodeorg.w3c.dom.NodeDOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.public void setNodeValue(java.lang.String value)
Nodenull, setting it has no effect.setNodeValue in class QAbstractNodeorg.w3c.dom.NodeDOMException - NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.DOMException - DOMSTRING_SIZE_ERR: Raised when it would return more characters than
fit in a DOMString variable on the implementation
platform.public NodeList getChildNodes()
getChildNodes in class QAbstractNodepublic Node getFirstChild()
Nodenull.getFirstChild in class QAbstractNodepublic Node getLastChild()
Nodenull.getLastChild in class QAbstractNodepublic Node getPreviousSibling()
Nodenull.getPreviousSibling in class QAbstractNodepublic Node getNextSibling()
Nodenull.getNextSibling in class QAbstractNodepublic NamedNodeMap getAttributes()
NodeNamedNodeMap containing the attributes of this node (if
it is an Element) or null otherwise.getAttributes in class QAbstractNode
public Node insertBefore(Node newChild,
Node refChild)
throws DOMException
NodenewChild before the existing child node
refChild. If refChild is null,
insert newChild at the end of the list of children.
newChild is a DocumentFragment object,
all of its children are inserted, in the same order, before
refChild. If the newChild is already in the
tree, it is first removed.insertBefore in class QAbstractNodeorg.w3c.dom.NodenewChild - The node to insert.refChild - The reference node, i.e., the node before which the
new node must be inserted.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild node, or if
the node to insert is one of this node's ancestors or this node
itself.
newChild was created
from a different document than the one that created this node.
refChild is not a child of
this node.
public Node replaceChild(Node newChild,
Node refChild)
throws DOMException
NodeoldChild with newChild
in the list of children, and returns the oldChild node.
newChild is a DocumentFragment object,
oldChild is replaced by all of the
DocumentFragment children, which are inserted in the
same order. If the newChild is already in the tree, it
is first removed.replaceChild in class QAbstractNodeorg.w3c.dom.NodenewChild - The new node to put in the child list.oldChild - The node being replaced in the list.DOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild node, or if
the node to put in is one of this node's ancestors or this node
itself.
newChild was created
from a different document than the one that created this node.
oldChild is not a child of
this node.
public Node removeChild(Node oldChild)
throws DOMException
NodeoldChild from the list
of children, and returns it.removeChild in class QAbstractNodeorg.w3c.dom.NodeoldChild - The node being removed.DOMException - NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.
oldChild is not a child of
this node.
public Node appendChild(Node newNode)
throws DOMException
NodenewChild to the end of the list of children
of this node. If the newChild is already in the tree, it
is first removed.appendChild in class QAbstractNodeorg.w3c.dom.NodenewChild - The node to add.If it is a
DocumentFragment object, the entire contents of the
document fragment are moved into the child list of this nodeDOMException - HIERARCHY_REQUEST_ERR: Raised if this node is of a type that does not
allow children of the type of the newChild node, or if
the node to append is one of this node's ancestors or this node
itself.
newChild was created
from a different document than the one that created this node.
public boolean hasChildNodes()
NodehasChildNodes in class QAbstractNodeorg.w3c.dom.Nodetrue if this node has any children,
false otherwise.public void normalize()
NodeText nodes in the full depth of the sub-tree
underneath this Node, including attribute nodes, into a
"normal" form where only structure (e.g., elements, comments,
processing instructions, CDATA sections, and entity references)
separates Text nodes, i.e., there are neither adjacent
Text nodes nor empty Text nodes. This can
be used to ensure that the DOM view of a document is the same as if
it were saved and re-loaded, and is useful when operations (such as
XPointer lookups) that depend on a particular document tree
structure are to be used.In cases where the document contains
CDATASections, the normalize operation alone may not be
sufficient, since XPointers do not differentiate between
Text nodes and CDATASection nodes.normalize in class QAbstractNode
public boolean checkValid()
throws java.lang.Exception
CauchoNodecheckValid in class QAbstractNodepublic QAbstractNode getNextPreorder()
getNextPreorder in class QAbstractNodepublic boolean equals(java.lang.Object arg)
equals in class java.lang.Object
public boolean equals(Node arg,
boolean deep)
equals in class QAbstractNodepublic Node item(int index)
item in interface NodeListorg.w3c.dom.NodeListindex - Index into the collection.indexth position in the
NodeList, or null if that is not a valid
index.public int getLength()
getLength in interface NodeList
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||