|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.xml.parser.v2.XMLNode
oracle.xml.parser.v2.XMLNSNode
Extends XMLNode to add support for Namespace names and children
Field Summary |
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 |
Fields inherited from interface org.w3c.dom.validation.NodeEditVAL |
VAL_FALSE, VAL_INCOMPLETE, VAL_NS_WF, VAL_SCHEMA, VAL_TRUE, VAL_UNKNOWN, VAL_WF |
Method Summary | |
void |
addText(char[] ch, int start, int length) Adds text to this node, or appends str to the last child if the last child is a text node. |
XMLNode |
addText(java.lang.String str) Adds text to this node, or appends str to the last child if the last child is a text node. |
Node |
appendChild(Node newChildArg) Adds the node newChild to the end of the list of children of this node. |
NodeList |
getChildNodes() Gets a NodeList that contains all children of this node. |
Node |
getFirstChild() Gets the first child of this node. |
Node |
getLastChild() Gets the last child of this node. |
java.lang.String |
getText() Returns the non-marked-up text contained by this element. |
Node |
insertBefore(Node newChildArg, Node refChildArg) Inserts the node newChild before the existing child node refChild . |
void |
normalize() Puts all Text nodes in the full depth of the sub-tree underneath this Node, including attribute nodes, into "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 oldChildArg) Removes the child node indicated by oldChildArg from the list of children, and returns it. |
Node |
replaceChild(Node newChildArg, Node oldChildArg) Replaces the child node oldChildArg with newChildArg in the list of children, and returns the oldChildArg node. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public NodeList getChildNodes()
NodeList
that contains all children of this node. If there are no children, this is a NodeList
containing no nodes. The content of the returned NodeList
is "live" in the sense that, for instance, changes to the children of the node object that it was created from are immediately reflected in the nodes returned by the NodeList
accessors; it is not a static snapshot of the content of the node. This is true for every NodeList
, including the ones returned by the getElementsByTagName
method.getChildNodes
in interface Node
getChildNodes
in class XMLNode
public Node getFirstChild()
null
.getFirstChild
in interface Node
getFirstChild
in class XMLNode
public Node getLastChild()
null
.getLastChild
in interface Node
getLastChild
in class XMLNode
public Node appendChild(Node newChildArg) throws DOMException
newChild
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 interface Node
appendChild
in class XMLNode
newChildArg
- 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.newChild
was created from a different document than the one that created this node.public Node removeChild(Node oldChildArg) throws DOMException
oldChildArg
from the list of children, and returns it.removeChild
in interface Node
removeChild
in class XMLNode
oldChildArg
- The node being removed.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this node is readonly.oldChildArg
is not a child of this node.public Node insertBefore(Node newChildArg, Node refChildArg) throws DOMException
newChild
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 interface Node
insertBefore
in class XMLNode
newChildArg
- The node to insert.refChildArg
- 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.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 newChildArg, Node oldChildArg) throws DOMException
oldChildArg
with newChildArg
in the list of children, and returns the oldChildArg
node. If the newChildArg
is already in the tree, it is first removed.replaceChild
in interface Node
replaceChild
in class XMLNode
newChildArg
- The new node to put in the child list.oldChildArg
- 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 newChildArg
node, or it the node to put in is one of this node's ancestors.newChildArg
was created from a different document than the one that created this node.oldChildArg
is not a child of this node.public void normalize()
normalize
in interface Node
normalize
in class XMLNode
public XMLNode addText(java.lang.String str) throws XMLDOMException
str
- text to addXMLDOMException
- if text can't be added to this nodepublic void addText(char[] ch, int start, int length) throws XMLDOMException
addText
in class XMLNode
ch
- char array to addstart
- start index in the char arraylength
- no of chars to be addedXMLDOMException
- if text can't be added to this nodepublic java.lang.String getText()
XMLDocument.getText
returns "William Shakespeare".
getText
in class XMLNode
|
Oracle® Application Server XML Java API Reference 10g Release 3 (10.1.3) B28238-01 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |