spuzhava@purdue.edu, 21.06.2010 22:54:
I was looking for a way to convert an xml fragment (_ElementTree object) to a flat file (comma separated perhaps). Though I understand this can be done quite easily by iterating, I just wanted to check if there was already something built in the library for this purpose. I tried going through the API (http://codespeak.net/lxml/api/index.html) but wasn't able to lay my hands on something that did this. I would be grateful if someone could let me know if they have come across a function that does this in lxml.
No, there's nothing pre-built. In any case, implementing this for your specific format should be rather simple and straight forward, but, IMHO, implementing it in a generic, configurable way that works with all sorts of different XML input formats and CSV (character separated values) output formats is futile. Stefan