Why should I use Huffman enoding if it makes my data longer?
I cannot see the benefit of Huffman coding in XML. First, the coding dictionary of each symbol has to be known on the receiving end, i.e.

&lt;dictionary&gt;&lt;code symbol=","&gt;01&lt;/code&gt;&lt;code symbol="2"&gt;11&lt;/code&gt;....&lt;/dictionary&gt;


Second, the Huffman coded data should be represented as 8-bit data to be space efficient. For example, your Huffman code for 2TR,07N becomes &amp;xECD1;&amp;x50;. However, 8-bit data is incompatible to XML because a lot of symbols are reserved for tags "&lt;>" or attributes ":=". 

If you are free to use any compression technique, I would suggest gzipping your data and then encoding the 8-bit data as base64. In this case, the string
 (264 characters without comma)

2TR,07N,2TS,082,084,2TT,2TU,2TV,2TW,2TX,2TY,2TZ,2U0,2U1,2U2,2U3,2U4,081,083,2U5,2U6,2U7,2U8,2U9,2UA,2UB,2UC,2UD,2UE,2UF,2UG,2UH,2UI,012,014,015,016,2UJ,2UK,2UL,2UM,2UN,2UO,2UP,2UQ,2UR,2US,2UT,2UU,2UV,2UW,2UX,2UY,2UZ,2V0,2V1,2V2,2V3,2V4,2V5,2V6,2V7,2V8,2V9,2VA,2VB,2VC,2VD,2VE,2VF,2VG,2VH,2VI,2VJ,2VK,2VL,2VM,2VN,2VO,2VP,2VQ,2VR,2VS,2VT,2VU,2VV,2VW,2VX


will be encoded as (232 characters)

H4sIACSf+1YAAxXPS1ZCMRBF0b5jSeMlgmDTDyAKfuDVFZ3/QNg0zlrVqcrOmE9tWn22MZ/btB5a
mGeVol9d9Kf/NmpS19C9Fna6bvNSD1pprUc96VkvetVGW+30pn2bune7O32p2/67PnTQUXz1pW/9
6KSzOIuzOIuzOIuzOMMZznCGLf4VvrgfvvCFL3zhC1/4whe+8IUve/GEJzzhCU94whOe8IQnPOEJ
T3hyubsCdDvGCWABAAA=


It is worth noting that gzip has Huffman coding in design, and the base64 encoding is a common practice for embedding PNG images in HTML.

References:


https://stackoverflow.com/questions/1091945/what-characters-do-i-need-to-escape-in-xml-documents
https://stackoverflow.com/questions/7849067/how-can-i-convert-a-string-into-a-gzip-base64-string