.TH "DOM::HTMLCollection" 3 "28 Jan 2004" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DOM::HTMLCollection \- An \fC \fBHTMLCollection\fP \fP is a list of nodes.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <html_misc.h>\fP
.PP
Inherited by DOM::HTMLFormCollection.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBHTMLCollection\fP (const  \fBHTMLCollection\fP &other)"
.br
.ti -1c
.RI "\fBHTMLCollection\fP & \fBoperator=\fP (const  \fBHTMLCollection\fP &other)"
.br
.ti -1c
.RI "unsigned long \fBlength\fP () const "
.br
.RI "\fIThis attribute specifies the length or size of the list. \fP"
.ti -1c
.RI "\fBNode\fP \fBitem\fP (unsigned long index) const "
.br
.RI "\fIThis method retrieves a node specified by ordinal index. \fP"
.ti -1c
.RI "\fBNode\fP \fBnamedItem\fP (const  \fBDOMString\fP &name) const "
.br
.RI "\fIThis method retrieves a \fC \fBNode\fP \fP using a name. \fP"
.ti -1c
.RI "\fBNode\fP \fBbase\fP () const "
.br
.ti -1c
.RI "HTMLCollectionImpl * \fBhandle\fP () const "
.br
.ti -1c
.RI "bool \fBisNull\fP () const "
.br
.ti -1c
.RI "\fBNode\fP \fBfirstItem\fP () const "
.br
.ti -1c
.RI "\fBNode\fP \fBnextItem\fP () const "
.br
.ti -1c
.RI "\fBNode\fP \fBnextNamedItem\fP (const  \fBDOMString\fP &name) const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBHTMLCollection\fP (NodeImpl *base, int type)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "HTMLCollectionImpl * \fBimpl\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBHTMLDocument\fP"
.br
.ti -1c
.RI "class \fBHTMLSelectElement\fP"
.br
.ti -1c
.RI "class \fBHTMLImageElement\fP"
.br
.ti -1c
.RI "class \fBHTMLMapElement\fP"
.br
.ti -1c
.RI "class \fBHTMLTableElement\fP"
.br
.ti -1c
.RI "class \fBHTMLTableRowElement\fP"
.br
.ti -1c
.RI "class \fBHTMLTableSectionElement\fP"
.br
.ti -1c
.RI "class \fBHTMLElement\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
An \fC \fBHTMLCollection\fP \fP is a list of nodes. 

An individual node may be accessed by either ordinal index or the node's \fC name \fP or \fC id \fP attributes. Note: Collections in the HTML \fBDOM\fP are assumed to be live meaning that they are automatically updated when the underlying document is changed. 
.PP
Definition at line 126 of file html_misc.h.
.SH "Member Function Documentation"
.PP 
.SS "unsigned long DOM::HTMLCollection::length () const"
.PP
This attribute specifies the length or size of the list. 
.SS "\fBNode\fP DOM::HTMLCollection::item (unsigned long index) const"
.PP
This method retrieves a node specified by ordinal index. Nodes are numbered in tree order (depth-first traversal order).
.PP
\fBParameters:\fP
.RS 4
\fIindex\fP The index of the node to be fetched. The index origin is 0.
.RE
.PP
\fBReturns:\fP
.RS 4
The \fC \fBNode\fP \fP at the corresponding position upon success. A value of \fC null \fP is returned if the index is out of range. 
.RE
.PP

.SS "\fBNode\fP DOM::HTMLCollection::namedItem (const \fBDOMString\fP & name) const"
.PP
This method retrieves a \fC \fBNode\fP \fP using a name. It first searches for a \fC \fBNode\fP \fP with a matching \fC id \fP attribute. If it doesn't find one, it then searches for a \fC \fBNode\fP \fP with a matching \fC name \fP attribute, but only on those elements that are allowed a name attribute.
.PP
\fBParameters:\fP
.RS 4
\fIname\fP The name of the \fC \fBNode\fP \fP to be fetched.
.RE
.PP
\fBReturns:\fP
.RS 4
The \fC \fBNode\fP \fP with a \fC name \fP or \fC id \fP attribute whose value corresponds to the specified string. Upon failure (e.g., no node with this name exists), returns \fC null \fP . 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
