News for hackers. Stuff that matters.
Re:A brief XML rant by the_mitsuhiko on Monday March 04, 2013 @09:29AM (#5318318)
While I do not recommend people to generate XML with Jinja2, it's actually not to bad at doing that. It will escape properly for you automatically and unlike many other solutions in Python it actually supports streaming.

</biased response>

Re:A brief XML rant by masklinn on Monday March 04, 2013 @10:01AM (#5318467)
> It will escape properly for you automatically and unlike many other solutions in Python it actually supports streaming.

True and true, but it does not guarantee the output XML will be valid: as far as Jinja's concerned it's all just text is it not? Genshi also supports streaming (using `serialize`), will also properly escape everything and — using the default xml serializer — ensures the output is valid XML.

(edit: I want to note that I wasn't trying to put down jinja, it's just the first text-based template I thought of when trying to write down a list, it's a fine templating language) (just not to generate XML)

Re:A brief XML rant by TazeTSchnitzel on Monday March 04, 2013 @12:49PM (#5319370)

  Error on line 2: Closing tag for non-existent opening tag "biased"

  Error on line 2: Closing tags cannot have attributes