Edit

Share via


XMLNodes Interface

Definition

A collection of XMLNode objects that represents the nodes in the tree view of the XML Structure task pane, which indicates the elements that a user has applied to a document.

public interface class XMLNodes : System::Collections::IEnumerable
[System.Runtime.InteropServices.Guid("D36C1F42-7044-4B9E-9CA3-85919454DB04")]
public interface XMLNodes : System.Collections.IEnumerable
type XMLNodes = interface
    interface IEnumerable
Public Interface XMLNodes
Implements IEnumerable
Attributes
Implements

Remarks

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.

You can return an XMLNodes collection for a selection, a range, or the entire document. The order in which the XMLNode objects appear in the XMLNodes collection is the same order in which their start or end tags appear within the specified selection, range, or document.

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 the ValidationErrorText[Boolean] property to display a message to the user as to what the user needs to fix in order to make the XML in the document conform to the XML schema rules.

Use the Add(String, String, Object) method to add an XML element to a selection, a range, or the document.

Because XML is case-sensitive, the XML element as typed in the Name parameter of the Add method must be typed exactly as it appears in the schema referenced in the Namespace parameter.

Properties

Application

Returns a Application object that represents the Microsoft Word application.

Count

Gets the number of items in the specified collection.

Creator

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

Item[Int32]

Returns an individual object in a collection.

Parent

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

Methods

Add(String, String, Object)

This object, member, or enumeration is deprecated and is not intended to be used in your code.

GetEnumerator()

Applies to