2008/9/19 Prashanth R <[EMAIL PROTECTED]>: > Is there a direct API ( without me writing code to iterate over xmlnodePtr > objects to find a node with a specific name ) > > Consider this example > <top> > <elementA></elementA> > <elementB></elementB> > <elementZ></elementZ> > </top> > > Say I have an xmlNodePtr instance that corresponds to the element - <top> > Now is there a directway of obtaining a ElementZ > Is there an API like this > > xmlNodePtr GetChildNodePtr(xmlNodePtr top, const char *childName) > > that will return me a reference to element Z > > Do i have to iterate thru elements to decide if there is a match ?
Have you tried using the XPath API? -- Aaron Patterson http://tenderlovemaking.com/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
