編輯

共用方式為


CustomXMLNode Interface

Definition

Represents an XML node in a tree in a document. The CustomXMLNode object is a member of the CustomXMLNodes collection.

public interface class CustomXMLNode : Microsoft::Office::Core::_IMsoDispObj
[System.Runtime.InteropServices.Guid("000CDB04-0000-0000-C000-000000000046")]
public interface CustomXMLNode : Microsoft.Office.Core._IMsoDispObj
[<System.Runtime.InteropServices.Guid("000CDB04-0000-0000-C000-000000000046")>]
type CustomXMLNode = interface
    interface _IMsoDispObj
Public Interface CustomXMLNode
Implements _IMsoDispObj
Attributes
Implements

Remarks

The CustomXMLNode object is designed to have funtional parity with the IXMLDOMNode interface. In addition, it contains an XPath property which is a great improvement over the objects provided by MSXML.

Properties

Application

Gets an Application object that represents the container application for a CustomXMLNode. Read-only.

Attributes

Gets a CustomXMLNode collection representing the attributes of the current element in the current node. Read-only.

BaseName

Gets the base name of the node without the namespace prefix, if one exists, in the Document Object Model (DOM). Read-only.

ChildNodes

Gets a CustomXMLNodes collection containing all of the child elements of the current node. Read-only.

Creator

Gets a 32-bit integer that indicates the application in which the CustomXMLNode object was created. Read-only.

FirstChild

Gets a CustomXMLNode object corresponding to the first child element of the current node. If the node has no child elements (or if it isn’t of type msoCustomXMLNodeElement), returns Nothing. Read-only.

LastChild

Gets a CustomXMLNode object corresponding to the last child element of the current node. If the node has no child elements (or if it is not of type msoCustomXMLNodeElement), the property returns Nothing. Read-only.

NamespaceURI

Gets the unique address identifier for the namespace of the CustomXMLNode object. Read-only.

NextSibling

Gets the next sibling node (element, comment, or processing instruction) of the current node. If the node is the last sibling at its level, the property returns Nothing. Read-only.

NodeType

Gets the type of the current node. Read-only.

NodeValue

Gets or sets the value of the current node. Read/write.

OwnerDocument

Gets the object representing the Microsoft Office Excel workbook, Microsoft Office PowerPoint presentation, or the Microsoft Office Word document associated with this node. Read-only.

OwnerPart

Gets the object representing the part associated with this node. Read-only.

Parent

Gets the parent object for the CustomXMLNode object. Read-only.

ParentNode

Gets the parent element node of the current node. If the current node is at the root level, the property returns Nothing. Read-only.

PreviousSibling

Gets the previous sibling node (element, comment, or processing instruction) of the current node. If the current node is the first sibling at its level, the property returns Nothing. Read-only.

Text

Gets or sets the text for the current node. Read/write.

XML

Gets the XML representation of the current node and its children, if any exist. Read-only.

XPath

Gets a String with the canonicalized XPath for the current node. If the node is no longer in the Document Object Model (DOM), the property returns an error message. Read-only.

Methods

AppendChildNode(String, String, MsoCustomXMLNodeType, String)

Appends a single node as the last child under the context element node in the tree.

AppendChildSubtree(String)

Adds a subtree as the last child under the context element node in the tree.

Delete()

Deletes the current node from the tree (including all of its children, if any exist).

HasChildNodes()

Returns True if the current element node has child element nodes.

InsertNodeBefore(String, String, MsoCustomXMLNodeType, String, CustomXMLNode)

Inserts a new node just before the context node in the tree.

InsertSubtreeBefore(String, CustomXMLNode)

Inserts the specified subtree into the location just before the context node.

RemoveChild(CustomXMLNode)

Removes the specified child node from the tree.

ReplaceChildNode(CustomXMLNode, String, String, MsoCustomXMLNodeType, String)

Removes the specified child node (and its subtree) from the main tree, and replaces it with a different node in the same location.

ReplaceChildSubtree(String, CustomXMLNode)

Removes the specified node (and its subtree) from the main tree, and replaces it with a different subtree in the same location.

SelectNodes(String)

Selects a collection of nodes matching an XPath expression. This method differs from the SelectNodes(String) method in that the XPath expression will be evaluated starting with the 'expression' node as the context node.

SelectSingleNode(String)

Selects a single node from a collection matching an XPath expression. This method differs from the SelectSingleNode(String) method in that the XPath expression will be evaluated starting with the 'expression' node as the context node.

Applies to