On Thu, 13 Dec 2007 17:49:20 -0800, Sean DiZazzo wrote: > I'm wrapping up a command line util that returns xml in Python. The > util is flaky, and gives me back poorly formed xml with different > problems in different cases. Anyway I'm making progress. I'm not > very good at regular expressions though and was wondering if someone > could help with initially splitting the tags from the stdout returned > from the util. > > […] > > Can anyone help me?
Flaky XML is often produced by programs that treat XML as ordinary text files. If you are starting to parse XML with regular expressions you are making the very same mistake. XML may look somewhat simple but producing correct XML and parsing it isn't. Sooner or later you stumble across something that breaks producing or parsing the "naive" way. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list