Re: [xml] Iterating over a node set
- From: Daniel Veillard <veillard redhat com>
- To: xml gnome org
- Subject: Re: [xml] Iterating over a node set
- Date: Fri, 10 Jan 2003 06:12:35 -0500
On Fri, Jan 10, 2003 at 12:03:50PM +0100, Holger Rauch wrote:
[...] 
struct _xmlNodeSet {
    int nodeNr;                 /* number of nodes in the set */
    int nodeMax;                /* size of the array as allocated */
    xmlNodePtr *nodeTab;        /* array of nodes in no particular order */
};
What's the reason for the distinction between nodeNr and nodeMax? When I
checked their values using a debugger they contained the same values (my
node set consisted of 10 elements, indicated by both nodeNr and nodeMax).
  Well that should be pretty clear from the comments ! nodeTab is allocated
for nodeMax maximum number of nodes, and nodeNr is the actual number of 
entries present in the array.
Daniel
-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]