[xml] direct Api to obtain specific child node



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 ? 






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