logo       

Re: still unsolved: parsing multiple XML from socket: msg#00015

Subject: Re: still unsolved: parsing multiple XML from socket
Hi Pete & Alek,
thanks for the discussion and suggestions.
I think I have enough info to try to implement a custom reader that:
  1. overrides the close() to avoid the SAX parser close the socket on exception (I still cannot understand why a parser that has received a socket as parapmeter, has the right to close it event if he did not open it... it is really an awful behavior to my understanding)
  2. adds a doClose() { super.close(); }  to acctually allow the client to close the socket
  3. overrides the read(char[] ...) to return data available on the socket until the next '>' (will try the suggested optimization in a second phase)
I will post my code on this forum to get feedback. Possibly it could become a new FAQ for Xerces2 (similar to FAQ-11 for Xerces1).
For the moment, thanks for your help! Any other suggestion for the reader implementation is more than welcome.
 
Bye,
Massimo
 
On 3/6/06, Peter Hendry <peter.hendry@xxxxxxxxxxxxx> wrote:

The issue is stopping Xerces from reading ahead in the buffer. If SAX is used then the endElement with depth == 0 won't help if Xerces has already pulled in bytes of the next XML document in the stream. That was the original problem. So using SAX alone is not the solution.

Pete

--------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe