You are can use any editor, including
sed, on an XML document. There is no requirement to use a specific editor.
In general white space does not matter in an XML document so long as it is well-formed and valid. Basically, a document is well-formed if it follows the syntax rules of the XML specification and the elements within it are correctly nested and part of a unique root.