INode Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The Node
interface is the primary datatype for the entire
Document Object Model.
[Android.Runtime.Register("org/w3c/dom/Node", "", "Org.W3c.Dom.INodeInvoker")]
public interface INode : Android.Runtime.IJavaObject, IDisposable, Java.Interop.IJavaPeerable
[<Android.Runtime.Register("org/w3c/dom/Node", "", "Org.W3c.Dom.INodeInvoker")>]
type INode = interface
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- Derived
- Attributes
- Implements
Remarks
The Node
interface is the primary datatype for the entire Document Object Model. It represents a single node in the document tree. While all objects implementing the Node
interface expose methods for dealing with children, not all objects implementing the Node
interface may have children. For example, Text
nodes may not have children, and adding children to such nodes results in a DOMException
being raised.
The attributes nodeName
, nodeValue
and attributes
are included as a mechanism to get at node information without casting down to the specific derived interface. In cases where there is no obvious mapping of these attributes for a specific nodeType
(e.g., nodeValue
for an Element
or attributes
for a Comment
), this returns null
. Note that the specialized interfaces may contain additional and more convenient mechanisms to get and set the relevant information.
The values of nodeName
, nodeValue
, and attributes
vary according to the node type as follows: <table border='1' cellpadding='3'> <tr> <th>Interface</th> <th>nodeName</th> <th>nodeValue</th> <th>attributes</th> </tr> <tr> <td valign='top' rowspan='1' colspan='1'> Attr
</td> <td valign='top' rowspan='1' colspan='1'>same as Attr.name
</td> <td valign='top' rowspan='1' colspan='1'>same as Attr.value
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>CDATASection
</td> <td valign='top' rowspan='1' colspan='1'> "#cdata-section"
</td> <td valign='top' rowspan='1' colspan='1'>same as CharacterData.data
, the content of the CDATA Section</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>Comment
</td> <td valign='top' rowspan='1' colspan='1'> "#comment"
</td> <td valign='top' rowspan='1' colspan='1'>same as CharacterData.data
, the content of the comment</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>Document
</td> <td valign='top' rowspan='1' colspan='1'> "#document"
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'> DocumentFragment
</td> <td valign='top' rowspan='1' colspan='1'>"#document-fragment"
</td> <td valign='top' rowspan='1' colspan='1'> null
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>DocumentType
</td> <td valign='top' rowspan='1' colspan='1'>same as DocumentType.name
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'> Element
</td> <td valign='top' rowspan='1' colspan='1'>same as Element.tagName
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> <td valign='top' rowspan='1' colspan='1'> NamedNodeMap
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>Entity
</td> <td valign='top' rowspan='1' colspan='1'>entity name</td> <td valign='top' rowspan='1' colspan='1'>null
</td> <td valign='top' rowspan='1' colspan='1'> null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>EntityReference
</td> <td valign='top' rowspan='1' colspan='1'>name of entity referenced</td> <td valign='top' rowspan='1' colspan='1'> null
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>Notation
</td> <td valign='top' rowspan='1' colspan='1'>notation name</td> <td valign='top' rowspan='1' colspan='1'> null
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>ProcessingInstruction
</td> <td valign='top' rowspan='1' colspan='1'>same as ProcessingInstruction.target
</td> <td valign='top' rowspan='1' colspan='1'>same as ProcessingInstruction.data
</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> <tr> <td valign='top' rowspan='1' colspan='1'>Text
</td> <td valign='top' rowspan='1' colspan='1'> "#text"
</td> <td valign='top' rowspan='1' colspan='1'>same as CharacterData.data
, the content of the text node</td> <td valign='top' rowspan='1' colspan='1'>null
</td> </tr> </table>
See also the Document Object Model (DOM) Level 3 Core Specification.
Java documentation for org.w3c.dom.Node
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Fields
AttributeNode |
The node is an |
CdataSectionNode |
The node is a |
CommentNode |
The node is a |
DocumentFragmentNode |
The node is a |
DocumentNode |
The node is a |
DocumentPositionContainedBy |
The node is contained by the reference node. |
DocumentPositionContains |
The node contains the reference node. |
DocumentPositionDisconnected |
The two nodes are disconnected. |
DocumentPositionFollowing |
The node follows the reference node. |
DocumentPositionImplementationSpecific |
The determination of preceding versus following is implementation-specific. |
DocumentPositionPreceding |
The second node precedes the reference node. |
DocumentTypeNode |
The node is a |
ElementNode |
The node is an |
EntityNode |
The node is an |
EntityReferenceNode |
The node is an |
NotationNode |
The node is a |
ProcessingInstructionNode |
The node is a |
TextNode |
The node is a |
Properties
Attributes |
A |
BaseURI |
The absolute base URI of this node or |
ChildNodes |
A |
FirstChild |
The first child of this node. |
Handle |
Gets the JNI value of the underlying Android object. (Inherited from IJavaObject) |
HasAttributes |
Returns whether this node (if it is an element) has any attributes. |
HasChildNodes |
Returns whether this node has any children. |
JniIdentityHashCode |
Returns the value of |
JniManagedPeerState |
State of the managed peer. (Inherited from IJavaPeerable) |
JniPeerMembers |
Member access and invocation support. (Inherited from IJavaPeerable) |
LastChild |
The last child of this node. |
LocalName |
Returns the local part of the qualified name of this node. |
NamespaceURI |
The namespace URI of this node, or |
NextSibling |
The node immediately following this node. |
NodeName |
The name of this node, depending on its type; see the table above. |
NodeType |
A code representing the type of the underlying object, as defined above. |
NodeValue |
The value of this node, depending on its type; see the table above. |
OwnerDocument |
The |
ParentNode |
The parent of this node. |
PeerReference |
Returns a JniObjectReference of the wrapped Java object instance. (Inherited from IJavaPeerable) |
Prefix |
The namespace prefix of this node, or |
PreviousSibling |
The node immediately preceding this node. |
TextContent |
This attribute returns the text content of this node and its descendants. |
Methods
AppendChild(INode) |
Adds the node |
CloneNode(Boolean) |
Returns a duplicate of this node, i. |
CompareDocumentPosition(INode) |
Compares the reference node, i. |
Disposed() |
Called when the instance has been disposed. (Inherited from IJavaPeerable) |
DisposeUnlessReferenced() |
If there are no outstanding references to this instance, then
calls |
Finalized() |
Called when the instance has been finalized. (Inherited from IJavaPeerable) |
GetFeature(String, String) |
This method returns a specialized object which implements the specialized APIs of the specified feature and version, as specified in . |
GetUserData(String) |
Retrieves the object associated to a key on a this node. |
InsertBefore(INode, INode) |
Inserts the node |
IsDefaultNamespace(String) |
This method checks if the specified |
IsEqualNode(INode) |
Tests whether two nodes are equal. |
IsSameNode(INode) |
Returns whether this node is the same node as the given one. |
IsSupported(String, String) |
Tests whether the DOM implementation implements a specific feature and that feature is supported by this node, as specified in . |
LookupNamespaceURI(String) |
Look up the namespace URI associated to the given prefix, starting from this node. |
LookupPrefix(String) |
Look up the prefix associated to the given namespace URI, starting from this node. |
Normalize() |
Puts all |
RemoveChild(INode) |
Removes the child node indicated by |
ReplaceChild(INode, INode) |
Replaces the child node |
SetJniIdentityHashCode(Int32) |
Set the value returned by |
SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from IJavaPeerable) |
SetPeerReference(JniObjectReference) |
Set the value returned by |
SetUserData(String, Object, IUserDataHandler) |
Associate an object to a key on this node. |
UnregisterFromRuntime() |
Unregister this instance so that the runtime will not return it from future Java.Interop.JniRuntime+JniValueManager.PeekValue invocations. (Inherited from IJavaPeerable) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |