Many thanks. That is the kind of "ammunition" I was looking for to try and convince the other programmer.
On Fri, 13 Aug 2004, Jesse Pelton wrote: > Assuming that by "XML statements" you mean "XML documents" as defined in > the XML specification > (http://www.w3.org/TR/2004/REC-xml-20040204/#sec-well-formed), the spec > should provide the documentation you need. A well-formed XML document > consists of a prolog (principally the XML declaration), a root element > (also called a document element) which typically has some number of > children, and zero or more processing instructions, comments, and/or > whitespace characters. After the close of the root element, anything > else (such as an element start tag or an XML declaration) breaks > well-formedness. > > In the best of all possible worlds, you'd get one document at a time. > Failing that, the sender of this stream of documents must provide a > reliable mechanism for separating documents. One approach would be for > the client to guarantee that every document begins with an XML > declaration, and that the string of characters that makes up an XML > declaration would never occur elsewhere in the stream of characters. > While simple in theory, this probably would not prove very robust. Some > sort of document encapsulation scheme (like MIME's multipart media type > - see http://www.faqs.org/rfcs/rfc2046.html) would be better. A > bare-bones approach would be to start the stream with a header that > indicates how many bytes are in the document that follows. You'd read > that number of bytes, process it as a document, then look for the next > header. You'd probably want some sort of error recovery mechanism in > case you didn't get the number of bytes you expected. > > > > > -----Original Message----- > > From: Dan White [mailto:[EMAIL PROTECTED] > > Sent: Thursday, August 12, 2004 10:09 PM > > To: [EMAIL PROTECTED] > > Subject: Handling/Parsing/Validating multiple XML Statements > > > > I am on the server end of a client-server setup. The programmer > > working on the client end is sending me multiple XML > > statements in one > > group. The XercesDOMParser I am using does not like it. > > > > I am looking for either a way to separate the incoming statements or > > documentation to support my request that the client send only > > one at a > > time. > > > > Thanks. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]