add sanitize options for toXml function. (& -> &amp;, etc.)

I needed to put '&' into the XML file in the entity form (&amp;). The same sanitize function as in toJson function is used to achieve the result.

Second reason:
The options for toXml function were not used (resulted in [Object object] at the beginning of XML file, if you tried to use them), fixed README.