I have 4000+ key-values records in REDIS. My XML file to server should be like:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="Address">Address</string>
<string name="AppName">App</string>
</resources>
I need to generate XML file with all values I can get from DB (the number may be different). All examples I saw before were with pre-defined structure - it is always known in advance how many rows there will be. But in my case it is always different number. How to generate XML file "with cycle"?
You can use jinja2 :
Your template.xml file :