Hmm, this looks like code that we could make part of <code>libvirt_xml/libvirt_xml.py</code>.  I will put this onto my TODO list to investigate later.