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

Function getTextFromXml

S3/BaseUtils.py:327–333  ·  view source on GitHub ↗
(xml, xpath)

Source from the content-addressed store, hash-verified

325
326
327def getTextFromXml(xml, xpath):
328 tree = getTreeFromXml(xml)
329 if tree.tag.endswith(xpath):
330 return decode_from_s3(tree.text) if tree.text is not None else None
331 else:
332 result = tree.findtext(xpath)
333 return decode_from_s3(result) if result is not None else None
334__all__.append("getTextFromXml")
335
336

Callers 15

_list_truncatedMethod · 0.85
_get_next_markerMethod · 0.85
get_bucket_locationMethod · 0.85
get_bucket_ownershipMethod · 0.85
website_infoMethod · 0.85
expiration_infoMethod · 0.85
get_versioningMethod · 0.85

Calls 2

getTreeFromXmlFunction · 0.85
decode_from_s3Function · 0.85

Tested by

no test coverage detected