I've looked further into the Xerces-C code and it appears that both the SAX and DOM parsers use XMLReader to get character data from the input source, and that XMLReader assumes that it can read until EOF.
What I'd like to do then seems impossible; which is to read top-level elements from a socket, one at a time, taking action on them in realtime as they're read. I want the parser to tell me when to stop reading one element and expect the next; I don't want to have to develop a redundant protocol to wrap the XML in. Is there some workaround to get this behavior? ------------------------------------------------------------------------ Joe Futrelle | "The copperhead could have been Team Leader, Emerge | delivering dance-hall cheats, with you, Scientific Data Tech. / NCSA | Peter shouldn't have been apprising http://emerge.ncsa.uiuc.edu/ | Leyland." -- J. Philippa Warwickshire