XML through a socket
I'm trying to parse XML thought a socket, but I'm running into a problem...I'm using the SAXParser to parse the data. The problem is that the parse method doesn't end until the inputstream is closed or the file ends. It seems the parser was made to read from a file. When an exception is thrown, the inputstream is closed, too. Is there a way to end the parse method without closing the inputStream and Socket?
Which way do your XML look like? I think an XML Document always have an EOF to indicate the XML String has ended?
Please post the code where you read from the socket into an inputstream
Did you try using StringReader and InputSource ?