Help Center

Local Navigation

Object: NodeList

Availability

BlackBerry® Device Software version 4.6 or later

The NodeList object is an array that contains an ordered collection of nodes.

You can access an individual Node within a collection by its index position using NodeList.item() or you can index the object directly. For example, if you create an instance of a NodeList object called myNodeList, then specifying

myNodelist.item(2)

is equivalent to specifying

myNodelist[2]

NodeList properties

Property name

Type

Description

Status

Availability

length

unsigned long

Returns the number of Nodes in the list.

read only

4.6 or later

NodeList methods

Method name

Description

Availability

item()

Returns the Node at the specified index in the collection.

4.6 or later

Method: NodeList.item()

Availability

BlackBerry® Device Software version 4.6 or later

The item() method returns the Node at the specified index in the collection.

Syntax

NodeList.item( index )

Parameters

Parameter

Type

Description

index

int

An integer that represents the node’s position in NodeList. Valid values are between 0 and NodeList.length-1 inclusive.

Return values

Returns the node at the indexth position in NodeList, or null if an invalid index position is specified.

Exceptions

None.

Next topic: Object: Notation

Was this information helpful? Send us your comments.