편집

다음을 통해 공유


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
type XMLNode = interface
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

Returns a Application object that represents the Microsoft Word application.

Attributes

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

BaseName

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

ChildNodes

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

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

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

FirstChild

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

HasChildNodes

Determines if the specified XML element has child elements.

LastChild

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

Level

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

NamespaceURI

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

NextSibling

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

NodeType

Returns a WdXMLNodeType constant that represents the type of node.

NodeValue

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

OwnerDocument

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

Parent

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

ParentNode

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

PlaceholderText

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

PreviousSibling

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

Range

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

SmartTag

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

Text

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

ValidationErrorText[Boolean]

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

ValidationStatus

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

WordOpenXML

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

XML[Boolean]

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

Methods

Copy()

Copies the specified object to the Clipboard.

Cut()

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

Delete()

Deletes the specified object.

RemoveChild(XMLNode)

Removes the specified child element from the specified element.

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)

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

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()

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

Applies to