I am using xmlData(options: [.nodePrettyPrint, .nodeCompactEmptyElement]) to pretty print and only part of the XML seems to be being treated.
xmlData(options: [.nodePrettyPrint, .nodeCompactEmptyElement])
This code