@staticmethod
    def data_to_xml(data, xml=None):
        """
        Creates an xml fragment from the specified data.
           data: Array of tuples, where first: xml element name
                                        second: xml element text
                                        third: conversion function
        """

        for element in data:
            name = element[0]
            val = element[1]
            if 2 > len(element):
                converter = element[2]
            else:
                converter = None

            if val is not None:
                if converter is not None:
                    text = _str(converter(_str(val)))
                else:
                    text = _str(val)

                entry = ET.Element(name)
                entry.text = text
                if xml is not None:
                    xml.append(entry)
                else:
                    return entry
        return xml
dataset/ETHPy150Open apache/libcloud/libcloud/compute/drivers/azure.py/AzureXmlSerializer.data_to_xml/swapped operands of `>`