def getXMLcontent(result): parser = DOMParser() parser.reset() parser.parse(InputSource(result.inputStream)) root = parser.getDocument().getDocumentElement() return root
def _parse_from_source(self, source): from org.apache.xerces.parsers import DOMParser p = DOMParser() p.parse(source) return Document(p.getDocument())