[Expat-discuss] expat stops parsing at '&' then calls my character data handler

Karl Waclawek karl at waclawek.net
Fri Nov 3 02:16:09 CET 2006


James Buchanan wrote:
> I was also thinking of setting the userData pointer to a bool so that
> when my start tag handler sees the tag is URL, set the userData to
> true (as in "in url") so that when my character data handler runs it
> will "accumulate" the data as it comes in if the next call of my char
> data handler returns  & character. Then set the userData bool var "in
> url" to false when the char handler sees the beginning of a new URL by
> looking out for http://, for example. The previously accumulated
> pieces could then be concatenated and I'd have my URL in tact with the
> & where it previously sent the & by itself.
>
> What would be the best way to handle this? Any advice?
>
>
>   
Yes, accumulating character data in a buffer is the standard way of
dealing with multiple character events in Expat.

Karl


More information about the Expat-discuss mailing list