Problem parsing XML with SAX in WSAD - Please help!

Discussion in 'XML' started by Jonathan, Oct 28, 2003.

  1. Jonathan

    Jonathan Guest

    I have written a SAX parser to read a simple XML file using this code
    :

    SAXParserFactory factory = SAXParserFactory.newInstance();

    javax.xml.parsers.SAXParser saxParser = factory.newSAXParser();

    saxParser.parse(new File(filePath),new PurgeHandler());

    For some reason, when the code enters the characters(char[] buf, int
    offset, int len) method of my handler, the 'len' is not correct
    sometimes, so the String returned by the code
    new String(buf,offset,len)
    is just part of the content of my element.

    Any help please?

    Thanks!!
     
    Jonathan, Oct 28, 2003
    #1
    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. Per Magnus L?vold
    Replies:
    0
    Views:
    1,402
    Per Magnus L?vold
    Nov 15, 2004
  2. Naren
    Replies:
    0
    Views:
    591
    Naren
    May 11, 2004
  3. Aleksandar Matijaca
    Replies:
    5
    Views:
    2,348
    Aleksandar Matijaca
    Sep 1, 2004
  4. Replies:
    2
    Views:
    507
  5. Erik Wasser
    Replies:
    5
    Views:
    482
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page