I think this could be improved, so if the XML namespaces are registered when the root simplexml element is created, we could unserialize the xml regadless the prefix used at the payload data. But the prepare function at https://github.com/ajgarlag/serializer/blob/xml-namespaces/src/JMS/Serializer/XmlDeserializationVisitor.php#L57 has no access to the ClassMetadata in order to call SimpleXMLElement::registerXPathNamespace

Any idea?