XML-Question

Discussion in 'Java' started by Konstantinos Agouros, Dec 26, 2003.

  1. 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
    ~

    --
    Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet:
    Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
    ----------------------------------------------------------------------------
    "Captain, this ship will not survive the forming of the cosmos." B'Elana Torres
    Konstantinos Agouros, Dec 26, 2003
    #1
    1. Advertising

  2. Konstantinos Agouros wrote:
    > 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
    Thomas Jollans, Dec 28, 2003
    #2
    1. Advertising

  3. In <bsmimv$avp$02$-online.com> Thomas Jollans <> writes:

    >Konstantinos Agouros wrote:
    >> 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.


    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
    --
    Dipl-Inf. Konstantin Agouros aka Elwood Blues. Internet:
    Otkerstr. 28, 81547 Muenchen, Germany. Tel +49 89 69370185
    ----------------------------------------------------------------------------
    "Captain, this ship will not survive the forming of the cosmos." B'Elana Torres
    Konstantinos Agouros, Dec 28, 2003
    #3
    1. Advertising

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. Bomb Diggy
    Replies:
    0
    Views:
    429
    Bomb Diggy
    Jul 28, 2004
  2. Tony Prichard
    Replies:
    0
    Views:
    707
    Tony Prichard
    Dec 12, 2003
  3. Mark Van Orman

    embedding xml in xml as non-xml :)

    Mark Van Orman, Sep 14, 2004, in forum: XML
    Replies:
    5
    Views:
    460
    Patrick TJ McPhee
    Sep 15, 2004
  4. Andy
    Replies:
    0
    Views:
    519
  5. Erik Wasser
    Replies:
    5
    Views:
    415
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page