XML parsing and formatting according to the DOM specification.