sabre-io / xml

sabre/xml is an XML library that you may not hate.
http://sabre.io/xml/
BSD 3-Clause "New" or "Revised" License
516 stars 77 forks source link

Feature request: changing the default deserializer #211

Open priyadi opened 2 years ago

priyadi commented 2 years ago

Right now the parser falls back to Sabre\Xml\Element\Base::xmlDeserialize if the element's name is not registered in $this->elementMap.

https://github.com/sabre-io/xml/blob/a6af111850e7536d200d9637c34885cd3c77a86c/lib/Reader.php#L286

I propose making this default configurable. With some XMLs, people extend them in a way that is impossible to know every vendor-specific variation out there. It would be nice if we can parse these elements into a generic class that fits with the rest of the resulting data structure.