I am parsing an XML file using xml.sax and xml.sax.handler
But the program does not run succesfully as there are some special characters in the 
XML file. Where can be the problem? How can I find the special characters and escape 
them. Can I convert them into Unicode? Can anybody point to a good document? Thanks 
alot...

[CODE SNIPPET]
if __name__ =='__main__':
        try:
                doccorpus = raw_input('enter file: ')
                parser = xml.sax.make_parser()
                handler = docHandler()
                parser.setContentHandler(handler)
                parser.parse(doccorpus)
                print 'file parsed successfully'
        except:
                print position
                print 'file parsing unsuccessful'
[/CODE SNIPPET]
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython

Reply via email to