Edit

Share via


XMLNodes.Count Property

Definition

Gets a count of the number of XML Document Object Model (DOM) node objects contained in the XMLNodesCollection collection.

public:
 property int Count { int get(); };
public int Count { get; }
member this.Count : int
Public ReadOnly Property Count As Integer

Property Value

Examples

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 &lt; selectedNodes.<span class="label">Count</span>; i++)
{
 thisXDocument.UI.Alert("XML DOM node name: " + selectedNodes[i].nodeName);
}

Remarks

Important: This member can be accessed without restrictions.

Applies to