'Return a DOM representation of this document.'

def asdom(self, dom=None):

    if (dom is None):
        import xml.dom.minidom as dom
    domroot = dom.Document()
    domroot.appendChild(self._dom_node(domroot))
    return domroot
