replace illegal xml characters

kyosohma at kyosohma at
Wed Mar 21 16:16:09 CET 2007

On Mar 21, 8:03 am, "killkolor" <gabriel.h... at> wrote:
> > Does InDesign export broken XML documents?  What exactly is your problem?
> yes, unfortunately it does. it uses all possible unicode characters,
> though not all are alowed in valid xml (see link in the first post).
> in any way for my application i should be checking if the xml that
> comes in is valid and replace all non-valid characters. is there
> something out there to do this?

You might be able to use "Beautiful Soup":

There are also some good examples for parsing XML at

and the Dive Into Python site.


More information about the Python-list mailing list