How I stopped fearing and learned to love the DOM. Simple exercise in java transforming file formats