unified xml input and output