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

    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

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


    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:


    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, May 27, 2004
    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.

Share This Page