Table 4-9 summarizes the methods of available through the NodeList
interface.
Table 4-9 Summary of NodeList Methods; DOM Package
Function | Summary |
---|---|
XmlDomFreeNodeList
|
Free a node list returned by XmlDomGetElemsByTag, and so on. |
XmlDomGetNodeListItem
|
Return nth node in list. |
XmlDomGetNodeListLength
|
Return length of node list. |
Free a node list returned by XmlDomGetElemsByTag
or related functions, releasing all resources associated with it. If given a node list that is part of the DOM proper (such as the children of a node), does nothing.
void XmlDomFreeNodeList( xmlctx *xctx, xmlnodelist *list)
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
list |
IN |
NodeList to free
|
Return nth node in a node list. The first item is index 0
.
xmlnode* XmlDomGetNodeListItem( xmlctx *xctx, xmlnodelist *list, ub4 index)
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
list |
IN |
NodeList
|
index |
IN |
index into list
|
(xmlnode *)
node at the nth position in node list [or NULL
]
Returns the number of nodes in a node list (its length). Note that nodes are referred to by index, so the range of valid indexes is 0
through length-1
.
ub4 XmlDomGetNodeListLength( xmlctx *xctx, xmlnodelist *list)
Parameter | In/Out | Description |
---|---|---|
xctx |
IN |
XML context |
list |
IN |
NodeList
|
(ub4)
number of nodes in node list