[Serializer] Refactored XmlEncoder to remove dependency to SimpleXml