Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > DocumentBuilder.parse don't get data from InputSource

Reply
Thread Tools

DocumentBuilder.parse don't get data from InputSource

 
 
David
Guest
Posts: n/a
 
      05-27-2004
Hi java folks,
I may have difficulties to explain clearly my problem, but I'm doing my
best.

I have a class "Receiver" which *receives* XML data on a socket. The
InputStream from the socket is packed as given below:

fluxLecture = new BufferedReader(new
InputStreamReader(socketClient.getInputStream()));

The other class "Sender", *sends* the XML data by calling println(String
str) on the PrintWriter object:

fluxEcriture.println(strXMLData);

Now I would like that "Receiver" interpretes the incoming XML data each
time a new XML data is sent by "Sender", so I do:

Document messageXML = interpreteurXML.parse(new InputSource(fluxLecture));

In fact i expected that each time:

fluxEcriture.println(strXMLData);

is called from the "Sender" a:

Document messageXML = interpreteurXML.parse(new InputSource(fluxLecture));

from the "Receiver" would get to parse the incoming XML data. But this is
not so.

Could someone explain me what am I doing wrong and how to solve
my problem please?

Thanking you for your attention.

----
David.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there someone who know how to use Inputsource class ? Garfield XML 1 10-16-2007 02:31 PM
from text file to InputSource (another how to get there from here question) Wendy S Java 2 01-12-2005 01:50 AM
Can't Process InputSource More Than Once? Rick Brandt Java 7 06-24-2004 02:22 PM
DocumentBuilder.parse(InputSource is) David Java 1 06-06-2004 09:52 AM



Advertisments