--- tools/python/xen/xm/create.py +++ tools/python/xen/xm/create.py @@ -1538,6 +1538,9 @@ SXPPrettyPrint.prettyprint(config) if opts.vals.xmldryrun and serverType == SERVER_XEN_API: + import xml + if hasattr(xml, "use_pyxml"): + xml.use_pyxml() from xml.dom.ext import PrettyPrint as XMLPrettyPrint XMLPrettyPrint(doc)