def METHOD_NAME(xml_string):
    def strip_or_none(text):
        text = text.strip() if text else None
        return text if text else None
    tree = etree.fromstring(xml_string)
    for e in tree.iter("*"):
        e.text = strip_or_none(e.text)
        e.tail = strip_or_none(e.tail)
    return etree.tostring(tree, encoding="utf-8")