Re: [xml] xmlList* functionality



Hi,

Smith Baylor wrote:
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.

[...]

I didn't work with it yet as well, but maby library code can be of some
help here - in case you didn't already look at it:

kbu librax:/data/home/kbuchcik/gnomecvs/libxml2$ grep -R 'xmlListWalk' *.c

c14n.c: xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx); c14n.c: xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx); c14n.c: xmlListWalk(list, (xmlListWalker) xmlC14NPrintAttrs, (const void *) ctx);
list.c: * xmlListWalk:
list.c:xmlListWalk(xmlListPtr l, xmlListWalker walker, const void *user) {
list.c:xmlListReverseWalk(xmlListPtr l, xmlListWalker walker, const void *user) {
testapi.c:test_xmlListWalk(void) {
testapi.c:    test_ret += test_xmlListWalk();
valid.c:    xmlListWalk(ref_list, xmlWalkRemoveRef, &target);
valid.c:    xmlListWalk(ref_list, xmlWalkValidateList, &memo);


Cheers,

Kasimier




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