virInterfacePtr iface;
char *xml = NULL;;
iface = virInterfaceLookupByName("br0");
if (!iface) {
printf ("Interface br0 not found.\n");
} else {
xml = virinterfaceGetXMLDesc(iface, 0);
virInterfaceUndefine(iface);
virinterfaceFree(iface);
}
/* you must also free the buffer at xml when you're finished with it */
--------------