|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | 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
| Constructor Summary |
| Type | Constructor |
|---|---|
protected |
XMLNSNode(java.lang.String tag)
Constructs a new XMLNSNode having the given name and type |
| Method Summary |
| Type | Method |
|---|---|
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 |
getLocalName()
Returns the local part of the qualified name of this node. |
java.lang.String |
getNamespaceURI()
The namespace URI of this node, or null if it is
unspecified. |
java.lang.String |
getNodeLocalName()
|
java.lang.String |
getNodeName()
Gets the name of this node, depending on its type |
java.lang.String |
getNodePrefix()
|
java.lang.String |
getPrefix()
The namespace prefix of this node, or null if it is
unspecified. |
java.lang.String |
getText()
Returns the non-marked-up text contained by this element. |
boolean |
hasChildNodes()
This is a convenience method to allow easy determination of whether a node has any children. |
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 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 oldChildArg)
Removes the child node indicated by oldChild from the list
of children, and returns it. |
Node |
replaceChild(Node newChildArg,
Node oldChildArg)
Replaces the child node oldChild with newChild
in the list of children, and returns the oldChild node. |
void |
setPrefix(java.lang.String prefix)
|
| Methods inherited from class oracle.xml.parser.v2.XMLNode |
addEventListener,
cloneNode,
dispatchEvent,
getAttributes,
getColumnNumber,
getDebugMode,
getLineNumber,
getNamespace,
getNextSibling,
getNodeType,
getNodeValue,
getOwnerDocument,
getParentNode,
getPreviousSibling,
getProperty,
getSystemId,
hasAttributes,
isNodeFlag,
isSupported,
print,
print,
print,
readChildNodes,
readExternal,
readExternal,
removeEventListener,
reportSAXEvents,
resetNodeFlag,
selectNodes,
selectNodes,
selectNodes,
selectSingleNode,
selectSingleNode,
setDebugInfo,
setNodeFlag,
setNodeValue,
setProperty,
supports,
transformNode,
valueOf,
valueOf,
writeExternal |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
protected XMLNSNode(java.lang.String tag)
XMLNSNode having the given name and typetag - Name of the node| Method Detail |
public java.lang.String getNodeName()
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.public Node getFirstChild()
null.public Node getLastChild()
null.
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.newChild - The node to insert.refChild - The reference node, i.e., the node before which the new
node must be inserted.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
oldChild with newChild
in the list of children, and returns the oldChild node. If
the newChild is already in the tree, it is first removed.newChild - The new node to put in the child list.oldChild - The node being replaced in the list.newChild node, or it
the node to put in is one of this node's ancestors.
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 oldChildArg)
throws DOMException
oldChild from the list
of children, and returns it.oldChild - The node being removed.oldChild is not a child of
this node.
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.newChild - 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 nodenewChild 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 boolean hasChildNodes()
true if the node has any children,
false if the node has no children.public java.lang.String getText()
XMLDocument.getText returns "William Shakespeare".
public XMLNode addText(java.lang.String str)
throws XMLDOMException
str - text to add
public void addText(char[] ch,
int start,
int length)
throws XMLDOMException
ch - char array to addstart - start index in the char arraylength - no of chars to be addedpublic void normalize()
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. 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.public java.lang.String getNamespaceURI()
null if it is
unspecified.
ELEMENT_NODE and
ATTRIBUTE_NODE and nodes created with a DOM Level 1
method, such as createElement from the
Document interface, this is always null.Per
the Namespaces in XML Specification an attribute does not inherit
its namespace from the element it is attached to. If an attribute is
not explicitly given a namespace, it simply has no namespace.public java.lang.String getNodePrefix()
public java.lang.String getPrefix()
null if it is
unspecified.
nodeName attribute, which holds the qualified name, as
well as the tagName and name attributes of
the Element and Attr interfaces, when
applicable.
namespaceURI and localName do not change.
ELEMENT_NODE and
ATTRIBUTE_NODE and nodes created with a DOM Level 1
method, such as createElement from the
Document interface, this is always null.prefix is
malformed, if the namespaceURI of this node is
null, if the specified prefix is "xml" and the
namespaceURI of this node is different from "
http://www.w3.org/XML/1998/namespace", if this node is an attribute
and the specified prefix is "xmlns" and the
namespaceURI of this node is different from "
http://www.w3.org/2000/xmlns/", or if this node is an attribute and
the qualifiedName of this node is "xmlns" .
public void setPrefix(java.lang.String prefix)
throws DOMException
public java.lang.String getNodeLocalName()
public java.lang.String getLocalName()
ELEMENT_NODE and
ATTRIBUTE_NODE and nodes created with a DOM Level 1
method, such as createElement from the
Document interface, this is always null.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||