Minor code cleanup in XmlUtils