DocumentBuilder.parse don't get data from InputSource

Discussion in 'Java' started by David, May 27, 2004.

  1. David

    David Guest

    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.
     
    David, May 27, 2004
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike
    Replies:
    0
    Views:
    9,996
  2. David
    Replies:
    1
    Views:
    2,539
    Filip Larsen
    Jun 6, 2004
  3. Wendy S
    Replies:
    2
    Views:
    5,905
    Wendy S
    Jan 12, 2005
  4. Replies:
    1
    Views:
    1,095
    Esmond Pitt
    Mar 27, 2005
  5. Replies:
    0
    Views:
    2,278
  6. BeGreen
    Replies:
    14
    Views:
    2,897
    BeGreen
    Aug 14, 2006
  7. Ed
    Replies:
    6
    Views:
    1,639
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=
    Aug 2, 2007
  8. John L.
    Replies:
    3
    Views:
    1,382
    Stanimir Stamenkov
    Jan 1, 2013
Loading...