[Expat-discuss] Clarification on the behavior of the text handler

Boris Kolpackov boris at codesynthesis.com
Tue Apr 10 21:07:31 CEST 2007


Hi Suresh,

"Suresh Kumar J" <suresh.kumar.j at gmail.com> writes:

> Lets say that I am passing the complete XML document to the XMLParse()
> API in a single shot. So If I register a character data handler for
> handling the element data then would I be getting the complete element
> text data in a single call to my registered text handler.

No, it still can be split across several calls. What you may want to
do to emulate the desired behavior is to accumulate the data in a
string buffer and then process it when you know that all the data
has been delivered, e.g., in the "end element" handler.

hth,
-boris


-- 
Boris Kolpackov
Code Synthesis Tools CC
http://www.codesynthesis.com
Open-Source, Cross-Platform C++ XML Data Binding



More information about the Expat-discuss mailing list