[RFR] [Serializer] Refactored XmlEncoder to remove dependency to SimpleXml

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | dunno
| License       | MIT
| Doc PR        | -

Instead of switching between SimpleXml and DOM Xml, we only use DOM Xml, in order to parse the source XML when decoding an XML string.