[Expat-discuss] How to handle predefined entities?

Fred L. Drake, Jr. fdrake@acm.org
Fri Jun 7 09:35:08 2002


YTian@cya.com writes:
 > In my xml file, there is an element looks like:
 >       <eleOne>id &lt; 123</eleOne>
 > I expected to get "id < 123", but the result was "id ". Seems expat
 > couldn't go through the &*; .
 > So, which handler should I use? Do you have any experience about this?

You should expect to get three calls to your character data handler;
these will provide the chunks "id ", "<", and " 123", in that order.
Your character data handler should simply accumulate data, and then
you process it in the element-end handler.


  -Fred

-- 
Fred L. Drake, Jr.  <fdrake at acm.org>
PythonLabs at Zope Corporation