D
David
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.
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.