Click to return to the XML (Extensible Markup Language) home page    
XMLDOMNodeList item Metho...     XMLDOMNodeList nextNode M...     XMLDOMNodeList Object    
Web Workshop  |  XML (Extensible Markup Language)

length Property


Indicates the number of items in the collection.

Syntax

lValue = oXMLDOMNodeList.length

Remarks

Long integer. The property is read-only.

Example

The following example creates an XMLDOMNodeList object, then uses its length property to support iteration:

Dim xmlDoc
Dim objNodeList

Set xmlDoc = CreateObject("microsoft.xmldom")
xmlDoc.async = False
xmlDoc.load("c:\xmlinact\books.xml")
Set objNodeList = xmlDoc.getElementsByTagName("AUTHOR")

For i=0 To (objNodeList.length -1)
  MsgBox (objNodeList.item(i).text)
Next

Applies To

[ Object Name ]
PlatformVersion
Win16:
Win32:
Mac:
Unix:
WinCE:
XMLDOMNodeList


Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.