XML technologies / XML / XML in a Nutshell / DOM reference / Object reference / DOMStringList

(Excerpt from "XML in a Nutshell" by Elliotte Rusty Harold & W. Scott Means)

This interface provides a read-only, ordered list of DOMString objects accessed through a zero-based index.

 

Attributes

The object DOMStringList has the following attributes:

 

length: unsigned long (3)

Returns the number of DOMString objects in the list. Read-only.

Java binding
public int getLength( );

 

Methods

The following methods are defined for this object:

 

contains: str (3)

Returns true, if the specified string is in the list; otherwise false.

Argument

  • str: DOMString

    The string value to search for.

Java binding
public boolean contains(String str);

 

item: index (3)

Used to retrieve strings from the list. Valid values for the argument index are 0 through length – 1. If an invalid index is specified, the method returns null.

Argument

  • index: unsigned long

    The index of the string to retrieve.

Java binding
public String item(int index);

  

 

 

 

back to top