XMLNodes.Count Property
Gets a count of the number of XML Document Object Model (DOM) node objects contained in the XMLNodesCollection collection.
Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.dll)
Syntax
'Declaration
'Usage
Example
In the following example, the Count property is used within a for loop to iterate through the collection of XML DOM node objects returned by the GetSelectedNodes method of the ViewObject object and display a message box indicating the name of each XML DOM node that is contained in the XMLNodes collection:
XMLNodes selectedNodes;
selectedNodes = thisXDocument.View.GetSelectedNodes();
for (int i=0; i < selectedNodes.Count; i++)
{
thisXDocument.UI.Alert("XML DOM node name: " + selectedNodes[i].nodeName);
}
See Also
Reference
XMLNodes Interface
XMLNodes Members
Microsoft.Office.Interop.InfoPath Namespace