xml peut être généré avec python
pip install -e git+git://github.com/5monkeys/easyxml.git@develop#egg=easyxml
Installez avec la commande ci-dessus
easyxml.py
# -*- coding: utf-8 -*-
from easyxml import EasyXML
books = EasyXML('books')
books.book(title='Example A')
books.book.author(name='John Smith', age=57)
books.book.publisher(name='Publisher A')
books.book(title='Example B')
books.book.author(name='Jane Doe', age=30)
books.book.author(name='James Cutter', age=45)
books.book.publisher(name='Publisher B')
print str(books)
# <?xml version="1.0" ?><books><book title="Example A"><author age="57" name="John Smith"/><publisher name="Publisher A"/></book><book title="Example B"><author age="30" name="Jane Doe"/><author age="45" name="James Cutter"/><publisher name="Publisher B"/></book></books>
Le xml de sortie n'est pas cassé ...
Recommended Posts