MCPcopy Index your code
hub / github.com/s3tools/s3cmd / getTreeFromXml

Function getTreeFromXml

S3/BaseUtils.py:287–297  ·  view source on GitHub ↗
(xml)

Source from the content-addressed store, hash-verified

285
286
287def 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

Callers 13

__init__Method · 0.85
get_printable_treeMethod · 0.85
role_configMethod · 0.85
getListFromXmlFunction · 0.85
getTextFromXmlFunction · 0.85
getRootTagNameFunction · 0.85
__init__Method · 0.85
enableLoggingMethod · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85
__init__Method · 0.85

Calls 2

stripNameSpaceFunction · 0.85
encode_to_s3Function · 0.85

Tested by

no test coverage detected