String content = ReleaseUtil.readXmlFile(pomFile, eol);
// we need to eliminate any extra whitespace inside elements, as JDOM will nuke it
content = content.replaceAll("<([^!][^>]*?)\\s{2,}([^>]*?)>", "<$1 $2>");
content = content.replaceAll("(\\s{2,}|[^\\s])/>", "$1 />");
SAXBuilder builder = new SAXBuilder();
Document document = builder.build(new StringReader(content));
// Normalize line endings to platform's style (XML processors like JDOM normalize line endings to "\n" as
// per section 2.11 of the XML spec)
normaliseLineEndings(document, eol);