xml data or other?
rustompmody at gmail.com
Sun Nov 18 16:54:05 CET 2012
On Nov 18, 6:32 pm, Artie Ziff <artie.z... at gmail.com> wrote:
> Unfortunately, xml parsing fails due to angle brackets inside
> description tags. In particular, xml.etree.ElementTree.parse()
> aborts on '<' inside xml data such as the following:
> <testname name="cron_test.sh">
> This testcase tests if crontab <filename> installs the cronjob
> and cron schedules the job correctly.
> What is right way to handle the extra angle brackets?
> Substitute on line-by-line basis, if that works?
> Or learn to write a simple stack-style parser, or
> recursive descent, it may be called?
> I am open to comments to improve my code more to be more readable,
> pythonic, or better.
> Many thanks
Start with cgi.escape perhaps?
More information about the Python-list