def quote_xml(inStr):
    if not inStr:
        return ''
    s1 = (isinstance(inStr, basestring) and inStr or
          inStr % '%s')
    s1 = s1.replace('&', '&amp;')
    s1 = s1.replace('<', '&lt;')
    s1 = s1.replace('>', '&gt;')
    return s1
dataset/ETHPy150Open iancmcc/ouimeaux/ouimeaux/device/api/xsd/service.py/quote_xml/swapped operands of `%`