No, there isn't. Xerces is an XML parser, which means it parses XML as
defined in the XML spec. What you want to do is not XML as the spec defines
it. You will have to break the data into legal documents and feed them to
the parser.

The only other option is that you effectively feed it an endless document,
i.e. you send up to the root element, then you start sending 'data packets'
which are elements that are children of that root element, each packet of
which is one of the bundles of info you care about. When you are ready to
drop the link, send the end tag for the root, and drop the connection, to
end the parse.

----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]



Joe Futrelle <[EMAIL PROTECTED]> on 04/04/2000 01:12:38 PM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  same question



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



Reply via email to