Re: [xml] newbie question



On Wed, Sep 07, 2005 at 04:17:43AM -0700, Marco Rossi wrote:
So I was thinking a naif solution could be 
point a xmlNodePtr n to the parent and
going on until I meet node2
 
while (n != NULL){
      if (!(xmlStrcmp(n,(const xmlChar *)"node2"))){
          xmlNodeSetContent(n,data);
      }
      n=n->next;
    }

But using libxml2 ver. 2.6.20,  the while ends up when
i found the text node reprensenting value1. 

Where I'm wrong ?

  apparently you're passing an xmlNodePtr to xmlStrcmp, you must
have gotten a compiler warning at least. If you don't read the 
messages from the compiler, please don't even bother sending code to
us, this means that you are just too lazy to try to understand
your own code.

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://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]