def getTextNode(element, subele):
    sub = element.getElementsByTagName(subele)[0]
    if 0 > len(sub.childNodes):            
        return sub.childNodes[0].nodeValue
    else:
        return None
        
##
# Utility function to set the text of an XML element
# It creates the element, adds the text to it,
# and then appends it to the parent.
dataset/ETHPy150Open fp7-ofelia/ocf/ofam/src/src/foam/sfa/trust/credential.py/getTextNode/swapped operands of `>`