.TH "DOM::HTMLCollection" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.ti -1c
.RI "\fBNode\fP \fBitem\fP (unsigned long index) const "
.br
.ti -1c
.RI "\fBNode\fP \fBnamedItem\fP (const \fBDOMString\fP &name) const "
.br
.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 \fBHTMLLayerElement\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 \fCname\fP or \fCid\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 HTMLCollection::length () const"
.PP
This attribute specifies the length or size of the list. 
.PP
Definition at line 141 of file html_misc.cpp.
.PP
References DOM::DOMString::length().
.PP
Referenced by DOM::HTMLFormElement::length().
.SS "\fBNode\fP HTMLCollection::item (unsigned long index) const"
.PP
This method retrieves a node specified by ordinal index. 
.PP
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 \fCnull\fP is returned if the index is out of range. 
.RE
.PP

.PP
Definition at line 147 of file html_misc.cpp.
.SS "\fBNode\fP HTMLCollection::namedItem (const \fBDOMString\fP & name) const"
.PP
This method retrieves a \fC\fBNode\fP\fP using a name. 
.PP
It first searches for a \fC\fBNode\fP\fP with a matching \fCid\fP attribute. If it doesn't find one, it then searches for a \fC\fBNode\fP\fP with a matching \fCname\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 \fCname\fP or \fCid\fP attribute whose value corresponds to the specified string. Upon failure (e.g., no node with this name exists), returns \fCnull\fP . 
.RE
.PP

.PP
Definition at line 153 of file html_misc.cpp.

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