libvirt: generate and parse xml using lxml