I\'m having trouble with special characters that exist in an xml node attribute. To combat this, I\'m trying to render the attributes as child nodes and, where necessary, using
Not sure of browser support for document.implementation.createDocument or createCDataSection, but this works in Mozilla at least: