Problem moving from SAX1 to SAX2
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Andy_Caulkett
Posted On:   Friday, December 21, 2001 02:48 AM

A similar question was posed by another developer in June but received no answers ... I have a few more specific details that may help. Have been using SAX1 with Crimson parser to parse XML over a socket stream from legacy C++ code. This worked fine. I now want to move to SAX2. However, the server test harness I am using (that works OK with SAX1)sends XML into the socket but the parser does nothing for a long time and then starts parsing. You can force the parser to parse by closing the stream but this is not suitable for my application. It seems to me that the XML must be buffered somewhere; I have shrunk the send and receive buffers on the serverside and clientside sockets but this just leads to slow transmission. So is the XML stream buffered   More>>

A similar question was posed by another developer in June but received no answers ... I have a few more specific details that may help.



Have been using SAX1 with Crimson parser to parse XML over a socket stream from legacy C++ code. This worked fine. I now want to move to SAX2. However, the server test harness I am using (that works OK with SAX1)sends XML into the socket but the parser does nothing for a long time and then starts parsing. You can force the parser to parse by closing the stream but this is not suitable for my application.



It seems to me that the XML must be buffered somewhere; I have shrunk the send and receive buffers on the serverside and clientside sockets but this just leads to slow transmission. So is the XML stream buffered in the parser and if so how can I decrease the size fo the buffer to get an instant parsing response?



Does anybody have any ideas?

   <<Less

Re: Problem moving from SAX1 to SAX2

Posted By:   Shane_Curcuru  
Posted On:   Thursday, January 3, 2002 01:03 PM

A couple of guesses:

Double-check exactly how you're handling namespaces. This changed a lot between SAX1 and SAX2, and the differences between a null namespace and a "" blank string namespace are pretty quirky in SAX2. This might also cause the parser to wait until you've finished if it's waiting for some namespace definition.

Try using Xerces instead of Crimson as the SAX2 parser and see what happens as an experiment. This might help tell if it's a Crimson bug or a bug with how you've converted to SAX2.

About | Sitemap | Contact