schmittjoh / JMSSerializerBundle

Easily serialize, and deserialize data of any complexity (supports XML, JSON, YAML)
http://jmsyst.com/bundles/JMSSerializerBundle
MIT License
1.8k stars 312 forks source link

Omit xml declaration ? #569

Open hiromik opened 7 years ago

hiromik commented 7 years ago

Is there an option to remove the xml declaration from the result when serializing to xml ?

goetas commented 7 years ago

Not yet. PR are welcome

On 5 May 2017 14:12, "hiromik" notifications@github.com wrote:

Is there an option to remove the xml declaration from the result when serializing to xml ?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/schmittjoh/JMSSerializerBundle/issues/569, or mute the thread https://github.com/notifications/unsubscribe-auth/AAvaJ8N3cusW6WN0C7qXEygeUz_kgABnks5r2xIigaJpZM4NR1gU .

imanzuk commented 4 years ago

Well, there is a LIBXML_NOXMLDECL option in libxml, but as of today, "only LIBXML_NOEMPTYTAG is supported" by PHP DOMDocument. See options in https://www.php.net/manual/en/domdocument.savexml.php.