XMLNode XMLNode XMLNode Interface

Definition

Represents a single XML element applied to a document.

public interface class XMLNode
[System.Runtime.InteropServices.Guid("09760240-0B89-49F7-A79D-479F24723F56")]
public interface XMLNode
Public Interface XMLNode
Attributes

Remarks

Each XML element that has been applied to a document is displayed as a node in a tree view control in the XML Structure task pane. Each node in the tree view is an instance of an XMLNode object. The hierarchy in the tree view indicates whether a node contains child nodes.

Use the Item[Int32] property of the XMLNodes collection to return an individual XMLNode object. Use the Validate() method to verify that an XML element is valid according to the applied schemas and that any required child elements exist and are in the required order. Once you run the Validate() method, use the ValidationStatus property to verify whether an element is valid, and use the ValidationErrorText[Boolean] property to display information about what the user needs to do to make the document conform to the XML schema rules.

Properties

Application Application Application

Returns a Application object that represents the Microsoft Word application.

Attributes Attributes Attributes

Returns a XMLNodes collection that represents the attributes for the specified element.

BaseName BaseName BaseName

Returns a String that represents the name of the element without any prefix.

ChildNodes ChildNodes ChildNodes

Returns a XMLNodes collection that represents the child elements of a specified element.

ChildNodeSuggestions ChildNodeSuggestions ChildNodeSuggestions

Returns a XMLChildNodeSuggestions collection that represents the list of allowed elements for the XMLNode object (which returns the child elements of a specified element).

Creator Creator Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

FirstChild FirstChild FirstChild

Returns a DiagramNode object that represents the first child node of a parent node.

HasChildNodes HasChildNodes HasChildNodes

Determines if the specified XML element has child elements.

LastChild LastChild LastChild

Returns a DiagramNode object that represents the last child node of a parent node.

Level Level Level

Returns the level of the specified XML element within the hierarchy of elements applied to a document.

NamespaceURI NamespaceURI NamespaceURI

Returns a String that represents the Uniform Resource Identifier (URI) of the schema namespace for the specified object.

NextSibling NextSibling NextSibling

Returns a XMLNode object that represents the next element in the document that is at the same level as the specified element.

NodeType NodeType NodeType

Returns a WdXMLNodeType constant that represents the type of node.

NodeValue NodeValue NodeValue

Returns or sets a String that represents the value of an attribute.

OwnerDocument OwnerDocument OwnerDocument

Returns a Document object that represents the parent document of the specified XML element.

Parent Parent Parent

Returns an object that represents the parent object of the specified object.

ParentNode ParentNode ParentNode

Returns a XMLNode object that represents the parent element of the specified element.

PlaceholderText PlaceholderText PlaceholderText

Returns or sets a String that represents the text displayed for an element that contains no text.

PreviousSibling PreviousSibling PreviousSibling

Returns a XMLNode object that represents the previous element in the document that is at the same level as the specified element.

Range Range Range

Returns a Range object that represents the portion of a document that's contained in the specified object.

SmartTag SmartTag SmartTag

Returns a SmartTag object that represents the smart tag associated with an XML element.

Text Text Text

Returns or sets a String that represents the text displayed for an XML element.

ValidationErrorText[Boolean] ValidationErrorText[Boolean] ValidationErrorText[Boolean]

Returns a String that represents the description for a validation error on an XMLNode object.

ValidationStatus ValidationStatus ValidationStatus

Returns a WdXMLValidationStatus constant that represents whether an element or attribute is valid according to the attached schema.

WordOpenXML WordOpenXML WordOpenXML

Returns a String that represents the XML for the node in the Microsoft Office Word Open XML format. Read-only.

XML[Boolean] XML[Boolean] XML[Boolean]

Returns a String that represents the XML text in the specified object.

Methods

Copy() Copy() Copy()

Copies the specified object to the Clipboard.

Cut() Cut() Cut()

Removes the specified object from the document and places it on the Clipboard.

Delete() Delete() Delete()

Deletes the specified object.

RemoveChild(XMLNode) RemoveChild(XMLNode) RemoveChild(XMLNode)

Removes the specified child element from the specified element.

SelectNodes(String, String, Boolean) SelectNodes(String, String, Boolean) SelectNodes(String, String, Boolean)

Returns a XMLNodes collection that represents all the nodes that match a specified XPath string in the order in which they appear.

SelectSingleNode(String, String, Boolean) SelectSingleNode(String, String, Boolean) SelectSingleNode(String, String, Boolean)

Returns an XMLNode object that represents the first node that matches a specified XPath string in the specified document.

SetValidationError(WdXMLValidationStatus, Object, Boolean) SetValidationError(WdXMLValidationStatus, Object, Boolean) SetValidationError(WdXMLValidationStatus, Object, Boolean)

Changes the validation error text displayed to a user for a specified node and forces Microsoft Word to report a node as invalid.

Validate() Validate() Validate()

Verifies an individual XML element or the entire document against the attached XML schema or schemas.

Applies to