(xml)
| 285 | |
| 286 | |
| 287 | def getTreeFromXml(xml): |
| 288 | xml, xmlns = stripNameSpace(encode_to_s3(xml)) |
| 289 | try: |
| 290 | tree = ET.fromstring(xml) |
| 291 | if xmlns: |
| 292 | tree.attrib['xmlns'] = xmlns |
| 293 | return tree |
| 294 | except Exception as e: |
| 295 | error("Error parsing xml: %s", e) |
| 296 | error(xml) |
| 297 | raise |
| 298 | __all__.append("getTreeFromXml") |
| 299 | |
| 300 |
no test coverage detected