Upravit

Sdílet prostřednictvím


XMLNodes.Item[Object] Property

Definition

Gets a reference to the specified XML Document Object Model (DOM) node from the XMLNodesCollection collection.

public:
 property Microsoft::Office::Interop::InfoPath::Xml::IXMLDOMNode ^ default[System::Object ^] { Microsoft::Office::Interop::InfoPath::Xml::IXMLDOMNode ^ get(System::Object ^ varIndex); };
public Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode this[object varIndex] { get; }
member this.Item(obj) : Microsoft.Office.Interop.InfoPath.Xml.IXMLDOMNode
Default Public ReadOnly Property Item(varIndex As Object) As IXMLDOMNode

Parameters

varIndex
Object

A numeric expression that specifies the position of a member of the XMLNodesCollection collection. The argument must be a number from 0 to the value of the collection's Count property minus 1.

Property Value

Examples

Because the Item property is the default property of the XMLNodesCollection collection, it can be used as follows:

XMLNodes contextNodes;
IXMLDOMNode contextNode;
contextNodes = thisXDocument.View.GetContextNodes(Type.Missing, Type.Missing);
contextNode = contextNodes[0];

Remarks

If the value provided for the varIndex argument does not match any existing member of the collection, an error occurs.

After you have set a reference to the XML DOM node object that Item property returns, you can access any of its properties and methods.

Applies to