XMLNodes.Item Property (2007 System)
Gets the XMLNode at the specified index.
Namespace: Microsoft.Office.Tools.Word
Assembly: Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)
Syntax
'Declaration
<BrowsableAttribute(False)> _
Public ReadOnly Default Property Item ( _
Index As Integer _
) As XMLNode
'Usage
Dim instance As XMLNodes
Dim Index As Integer
Dim value As XMLNode
value = instance(Index)
[BrowsableAttribute(false)]
public XMLNode this[
int Index
] { get; }
[BrowsableAttribute(false)]
public:
property XMLNode^ default[int Index] {
XMLNode^ get (int Index);
}
JScript does not support indexed properties.
Parameters
Index
Type: System.Int32Indicates the position of the node that you want to retrieve.
Property Value
Type: XMLNode
The XMLNode at the specified index.
Remarks
The Item property returns a XMLNode object rather than a Microsoft.Office.Tools.Word.XMLNode control. For more information, see Programmatic Limitations of Host Items and Host Controls.
Examples
The following code example uses the Item property to get the first XMLNode in an XMLNodes collection. The example uses the Item property implicitly when a specific index of the collection is specified. This example assumes that the current document contains an XMLNodes control named SampleInsertNodes.
Private Sub DisplayNodeName()
Dim node1 As Word.XMLNode = Me.SampleInsertNodes(1)
MsgBox(node1.BaseName)
End Sub
private void DisplayNodeName()
{
Word.XMLNode node1 = this.SampleInsertNodes[1];
MessageBox.Show(node1.BaseName);
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.