On Fri, Dec 11, 2009 at 13:23, nnguyen <nguy...@gmail.com> wrote: > > Any ideas on any expat tricks I'm missing out on? I'm also inclined to > try another parser that can keep the string together when there are > entities, or at least ampersands.
IIRC expat explicitly does not guarantee that character data will be handed to the CharacterDataHandler in complete blocks. If you're certain you want to stay at such a low level, I would just modify your char_data method to append character data to self.current_data rather than replacing it. Personally, if I had the option (e.g. Python 2.5+) I'd use ElementTree... -- -------- Rami Chowdhury "Never assume malice when stupidity will suffice." -- Hanlon's Razor 408-597-7068 (US) / 07875-841-046 (UK) / 0189-245544 (BD) -- http://mail.python.org/mailman/listinfo/python-list