Ideally, I would use an XML parser; however, the given property in DOMDocument is read-only, and SimpleXML doesn't touch it... You'd prefer at least a preg_replace(), I'm assuming?