jPOS
jPOS copied to clipboard
ISOTaggedField#dump outputs invalid XML
When using TaggedSequencePackager and ISOTaggedField, the dump method produces output such as
<isomsg id="48">
<!-- org.jpos.tlv.packager.TaggedSequencePackager -->
<0002><field id="1" value="SUR"/></0002>
<0003><field id="2" value="SUR"/></0003>
<0023><field id="3" value="CT6"/></0023>
<0052><field id="4" value="210"/></0052>
...
This is invalid, badly-formed XML: the tags of type <number> are invalid, and would prevent the XMLPackager and other XML tools from parsing the output of the dump method.
A suggested fix would be to dump them like:
<field id="4" type="tagged" tag="0052" value="210" />
or the type attribute could be "tlv"
NOTE This could be a breaking change for code that expects the old output! Please comment