Hi!,
I have an application that produces data in XML format. Clients can connect using TCP/IP and once connected, the DTD is sent, followed by well formed and valid (except for the last closing tag) XML data as it is generated. I have tried using the following code:

***************************************************************************
    try {
      Parser parser;
      //
      SAXParserFactory spf = SAXParserFactory.newInstance();
      String validation = System.getProperty("javax.xml.parsers.validation","true");
      if (validation.equalsIgnoreCase("true")) spf.setValidating(true);
      //
      SAXParser sp = spf.newSAXParser();
      parser = sp.getParser();
      //
      XMLParser xmlParser = new XMLParser(this.xmlData);
      parser.setDocumentHandler(xmlParser);
      parser.setErrorHandler(xmlParser);
      //
      parser.parse(new InputSource(socket.getInputStream()));
    } catch (SAXParseException e) {
      System.out.println("***ERROR*** Parsing Error " + " , line " + e.getLineNumber() +
      ", uri " + e.getSystemId());
      System.out.println("  " + e.getMessage());
      System.exit(1);
    } catch (SAXException se) {
      Exception x = se;
      if (se.getException() != null) {
        x = se.getException();
        x.printStackTrace();
      }
      System.exit(1);
    } catch (Throwable t) {
      t.printStackTrace();
      System.exit(1);
    }

***************************************************************************

While the startDocument event is triggered, nothing else happens. I have checked and indeed, the data stream is coming through.

Help anyone?


Chikeobi Otuokere Njaka
cnjaka@ndsamericas.com