generalized xml builder