It is of a fashion - impossibly malformed XML.
The data now given above ( and specified output ) is now fully representative, this tool is effectivley a parser to take some poor output, to poor, but well-formed XML.
Although Im keen to continue with this approach, is the solution on a differant approach ?