Moving XML parsers from data classes constructors