XMLNodes Interface

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.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
<GuidAttribute("D36C1F42-7044-4B9E-9CA3-85919454DB04")> _
Public Interface XMLNodes _
    Inherits IEnumerable
'Usage
Dim instance As XMLNodes
[GuidAttribute("D36C1F42-7044-4B9E-9CA3-85919454DB04")]
public interface XMLNodes : IEnumerable

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 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 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 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.

See Also

Reference

XMLNodes Members

Microsoft.Office.Interop.Word Namespace