def _xml(self):
grouped = self._weight_by_hue()<EOL>xml = "<STR_LIT>" + self.name + "<STR_LIT>" + "<STR_LIT:U+002CU+0020>".join(self.tags) + "<STR_LIT>"<EOL>for total_weight, normalized_weight, hue, ranges in grouped:<EOL><INDENT>if hue == self.blue: hue = "<STR_LIT>"<EOL>clr = color(hue)<EOL>xml += "<STR_LIT>" + clr.name + "<STR_LIT>" + str(normalized_weight) + "<STR_LIT>"<EOL>xml += "<STR_LIT>" + str(clr.r) + "<STR_LIT>" + str(clr.g) + "<STR_LIT>"<EOL>xml += "<STR_LIT>" + str(clr.b) + "<STR_LIT>" + str(clr.a) + "<STR_LIT>"<EOL>for clr, rng, wgt in ranges:<EOL><INDENT>xml += "<STR_LIT>" + str(rng) + "<STR_LIT>" + str(wgt / total_weight) + "<STR_LIT>"<EOL><DEDENT>xml = xml.rstrip("<STR_LIT:U+0020>") + "<STR_LIT>"<EOL><DEDENT>xml += "<STR_LIT>"<EOL>return xml<EOL>
Returns the color information as XML.

The XML has the following structure:
<colors query="">
    <color name="" weight="" />
        <rgb r="" g="" b="" />
        <shade name="" weight="" />
    </color>
</colors>

Notice that ranges are stored by name and retrieved in the _load()
method with the shade() command - and are thus expected to be
shades (e.g. intense, warm, ...) unless the shade() command would
return any custom ranges as well. This can be done by appending custom
ranges to the shades list.