XML-Question

  • Thread starter Konstantinos Agouros
  • Start date
K

Konstantinos Agouros

Hi,

I wrote a Java-Application that connects to a server and gets data from this
server in XML. While using JDK 1.3 I used xerces 1.4.4 as XML-API.
Since I keep the connection open and multiple xml-documents are received and
parsed and this doesn't work with xerces it was suggested that I overwrite
DefaultReaderFactory. This worked fine.

Since JDK 1.4 provides JAXP but the reader-classes from xerces are not there
my question is how do I do it without xerces?

The idea is, that the server sends a complete xml-document everytime it has new
data that the client should display. Do I need the trick with the
StreamingCharFactory at all anymore?

Thanks,

Konstantin
~
 
T

Thomas Jollans

Konstantinos said:
Hi,

I wrote a Java-Application that connects to a server and gets data from this
server in XML. While using JDK 1.3 I used xerces 1.4.4 as XML-API.
Since I keep the connection open and multiple xml-documents are received and
parsed and this doesn't work with xerces it was suggested that I overwrite
DefaultReaderFactory. This worked fine.

Since JDK 1.4 provides JAXP but the reader-classes from xerces are not there
my question is how do I do it without xerces?

The idea is, that the server sends a complete xml-document everytime it has new
data that the client should display. Do I need the trick with the
StreamingCharFactory at all anymore?

Thanks,

Konstantin
~

I have never worked with xerces but all you need is probably in this
tutorial: http://java.sun.com/xml/tutorial_intro.html (and the API, of
course). The tutorial reads from a file, but that shouldn't be to hard
to change to networkstreams.

Thomas
 
K

Konstantinos Agouros

I have never worked with xerces but all you need is probably in this
tutorial: http://java.sun.com/xml/tutorial_intro.html (and the API, of
course). The tutorial reads from a file, but that shouldn't be to hard
to change to networkstreams.

The original point was, that reading different XML-Documents from one input
source wasn't supposed to happen in xerces. However I changed the code to
use the JAXP-Stuff from 1.4 and it seems to work.

Cheers,

Konstantin
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top