Hi
Its something similar to below. I am using sockets here, so I have shortened
down what is happening.
Client Code:
Socket clientSocket;
PrintStream output;
BufferedInputStream input;
clientSocket = new Socket(host, port); // valid ip and port number
input = new BufferedInputStream(clientSocket.getInputStream());
output = new PrintStream=(clientSocket.getOutputStream(),false,"UTF-16");
output.print("Test");
output.flush();
Server Code:
ServerSocket socket = new ServerSocket(port); // port should correspond to
the client port.
FilterInputStream myFilterStream =
new FilterInputStream(newBufferedInputStream(socket.getInputStream()));
DOMParser myParser = new DOMParser();
myParser.parse(new InputSource(myFilterStream)); // this is where it hangs.
Arthur De Magalhaes wrote:
>
> Hi Siobhan,
>
> Do you have a testcase we can try out?
>
> Thanks,
>
> Arthur De Magalhaes
> XML Parser Development
> IBM Toronto Lab
> Phone: 905-413-2993 T/L 313-2993
> E-mail: [EMAIL PROTECTED]
>
>
>
>
> Siobhan <[EMAIL PROTECTED]>
> 08/14/2008 06:54 AM
> Please respond to
> [email protected]
>
>
> To
> [email protected]
> cc
>
> Subject
> DOMParser.parse method hanging when trying to parse a UTF-16 document
>
>
>
>
>
>
>
> Hi
> I am using xerces 2.6.2.
> I am using DOMParser to parse an inputStream with an encoding of type
> UTF-16
> and the parser is hanging. I have successfully parsed documents where the
> encoding is set to UTF-8.
>
> I have the following:
> ppin = new FilterInputStream (new BufferedInputStream(socket
> .getInputStream()));
>
> DOMParser myParser = new DOMParser();
>
> myParser.parse(new InputSource(ppin));
>
> Any suggestions/comments would be much appreciated.
> thanks
>
> --
> View this message in context:
> http://www.nabble.com/DOMParser.parse-method-hanging-when-trying-to-parse-a-UTF-16-document-tp18979412p18979412.html
>
> Sent from the Xerces - J - Dev mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
--
View this message in context:
http://www.nabble.com/DOMParser.parse-method-hanging-when-trying-to-parse-a-UTF-16-document-tp18979412p18994348.html
Sent from the Xerces - J - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]