Re: [xml] xmlList* functionality



Thanks.  I found that out and fixed the code accordingly.  But, I am
still having problems retrieving the data soted in the list

xmlListPtr list;
list = xmlListCreate(NULL, NULL);
if ( (xmlListInsert (list, (void *) "test") ) ) {
  printf ("error\n");
}
printf ("list size=%d\n", xmlListSize(list)); /* will print 1 which is
correct */

I have not been able to understand or use the xmlListWalk and
xmlListWalker APIs to get the list data.  I really appreciate any
help.

Thanks in advance


On Tue, 14 Dec 2004 18:32:33 +0100, Kasimier Buchcik
<kbuchcik 4commerce de> wrote:
Hi,

Smith Baylor wrote:
Hi,

Are there any examples of using
xmlListCreate, xmlListInsert, xmlListWalk and xmlListWalker

xmlListPtr list;
list = xmlListCreate(NULL, NULL);
if (! (xmlListInsert (list, (void *) "test") ) ) {
  printf ("error\n");
}

I am getting error in the o/p.  Any clues as to what I am doing wrong?
 Any samples for all the List functions is greatly appreciated.

The doc for xmlListInsert [1] says that this function returns 0 if it
succeeds.

[1] http://www.xmlsoft.org/html/libxml-list.html#xmlListInsert

Cheers,

Kasimier





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]