On Mon, May 19, 2008 at 12:48:59PM +0100, Richard W.M. Jones wrote: > On Mon, May 12, 2008 at 01:35:33AM +0200, Stefan de Konink wrote: > > Wouldn't it be much nicer for Joe Programmer if the API facilitated the > > functions: > > > > char ** virDomainInterfacePaths(virDomainPtr dom); > > char ** virDomainBlockPaths(virDomainPtr dom); > > > > I really don't get why XML parsing should be done for something that is > > almost too trivial to export. Any reasons why not to do implement this? > > Yes, I tend to agree that parsing the XML is a pain. On the other > hand you can write the functions above pretty quickly using libxml2 > and XPATH. Perhaps the easiest solution is some example code? There are simple XPath wrappers for libxml2 in the src/xml.c module. Things like virXPathString, virXPathNumber or virXPathNode. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list