kalyanasundaram s wrote: > I need to parse a huge xml file for a specific set of nodes. Is there > any method like getElementByName is available in libxml. I could not > find it in the document. Does it exists with some other name? > Otherwise i will have to travel in the entire tree. It is inefficient.
No it's not. It just depends on the implementation of getElementByName. :) You can always use XPath to find the tag. However, if your XML tree is really so big (note that XPath is pretty fast, so I'd try it first) you may consider building an index of the tree, i.e. some kind of data structure that maps tag names to a list of node pointers. Note that there is also a hash map implementation in libxml2, see hash.c. Stefan _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
