<?xml version="1.0" encoding="utf-8"?>
<interface name="DOM_NodeList" short="the Document Object Model (DOM) DOM_NodeList interface">

<comments>
	Copyright 2003 Michael B. Allen &lt;mballen@erols.com&gt;
	Generated by CStyleX 0.1.1
</comments>

<include>domc.h</include>

<title>DOM_NodeList</title>

<desc>
The <tt>DOM_NodeList</tt> type provides access to an ordered collection of nodes. The <tt>childNodes</tt> member of <tt>DOM_Node</tt> is a <tt>DOM_NodeList</tt>. The <tt>getElementsByTagName</tt> functions also return a <tt>DOM_NodeList</tt>.
<p/>
The DOM recommendations specify that these lists are live meaning that modifying the children of a node should be reflected in a list returned by the <tt>getElementsByTagName</tt> functions. <i>Currently DOMC does not update a <tt>DOM_NodeList</tt> returned by the <tt>getElementsByTagName</tt> functions if source nodes are subsequently removed or if a node is added that should be included</i>.

<example id="enumchild">
<title>Enumerating the children of an Element</title>
<desc>
This example illustrates how to enumerate and print each comment child of a <tt>DOM_Element</tt> node.
<pre>
for (idx = 0; i &lt; elem-&gt;childNodes-&gt;length; i++) {
	DOM_Node *node = DOM_NodeList_item(elem-&gt;childNodes, idx);
	if (node-&gt;nodeType == DOM_COMMENT_NODE) {
		printf("comment: %s\n", DOM_Node_getNodeValue(node));
	}
}
</pre>
</desc>
</example>
</desc>

<group>
<title>The DOM_NodeList type</title>

<code>
<desc>The <tt>DOM_NodeList</tt> structure provides a <tt>length</tt> member containing the number of elements in the list. This member must never be modified.</desc>
<pre>
typedef struct {
	int length; 
	/* other members */
} DOM_NodeList;
</pre>
</code>

<meth name="item">
<pre>DOM_Node *DOM_NodeList_item(DOM_NodeList *this, int index);</pre>
<param name="this"/>
<param name="index"/>
<desc>
The <tt>DOM_NodeList_item</tt> function returns the node in <tt>this</tt> list at <tt>index</tt> which starts from 0.
</desc>
<ret>
The node at the specified index or NULL if there is no such node.
</ret>
</meth>
</group>

</interface>

