jpadilla / django-rest-framework-xml

XML support for Django REST Framework
http://jpadilla.github.io/django-rest-framework-xml
BSD 3-Clause "New" or "Revised" License
86 stars 59 forks source link

Create a TemplateXMLRender #43

Open Otoru opened 4 years ago

Otoru commented 4 years ago

There are cases when there is a need for an API that returns a specific XML format. FreeSwitch integrations via XML-CURL for example.

For such purposes, it would be interesting to have XML templates that could be dynamically rendered, similar to TemplateHTMLRender.

If the project members are in agreement, I am willing to work on this new functionality.

marco-silva0000 commented 4 years ago

I hacked my way into a copied version of this project to achieve that, but a supported standard way would be nice... What I made was a DictRenderer that would convert the dict keys to XML tags, and the values would be the content... I can make a fork with this work if you want to see it