---
name: "HTMLDocument.getListItem"
section: "3kaya"
platform: "linux"
package: "kaya"
version: "0.4.4-6.2"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/HTMLDocument.getListItem"
---

# HTMLDocument.getListItem(3kaya)

Retrieve a list item

## NAME

HTMLDocument::getListItem - Retrieve a list item

## SYNOPSIS

**ElementTree getListItem(** *ElementTree list, Int index* **)**

## ARGUMENTS

**list** The list to search

**index** The index to retrieve (starting at zero)

## DESCRIPTION

Gets the list item within a list at the specified index. If the index given is not in the list, an **Array.OutOfBounds (3kaya)** Exception will be thrown. If the list given is not actually a list, a **HTMLDocument.RequiresElement (3kaya)** Exception is thrown.

-

   list = addList(parent,Unordered,10);\
    for i in \[0..9\] {\
       item = getListItem(list,i);\
       addString(item,"This is item "+(i+1));\
    }

## AUTHORS

Kaya standard library by Edwin Brady, Chris Morris and others (kaya@kayalang.org). For further information see http://kayalang.org/

## LICENSE

The Kaya standard library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License (version 2.1 or any later version) as published by the Free Software Foundation.

## RELATED

**HTMLDocument.addList (3kaya)**

**HTMLDocument.addListItem (3kaya)**

**HTMLDocument.pushListItem (3kaya)**
