xml parser rewritten to output len and pos of values