On Wed, Oct 29, 2008 at 11:38:29AM -0700, Prashant R wrote:
> Is there a direct way  ( API or otherwise)(other than iterating over child
> nodes and incrementing a counter ) to  obtain the number of element nodes
> under a given xmlNodePtr variable  ?

  no, you need to iterate. Since in general it really depends on the
kind of nodes used (comments would not count for the user for example)
the APi would be mostly useless. Only the application knows what it's
interested in and the XML layer has the mandate to report everything.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
[EMAIL PROTECTED]  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
[email protected]
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to