'Check that C{input}, when parsed, produces a DOM where the XML
of the document element is equal to C{expected}.'

def checkParsed(self, input, expected, beExtremelyLenient=1):

    output = microdom.parseString(input, beExtremelyLenient=beExtremelyLenient)
    self.assertEqual(output.documentElement.toxml(), expected)
