• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

SAX parser problem (very odd)

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I�m trying to parse a XML file using SAX, it worked fine until i test with a larger file(about 12MB), in the characters() implementation, i�m trying to load the value into an object, but the object that comes with the characters()(the value of the element) comes wrong, i mean it comes but comes with less bytes.
explanation:
I make a System.out with the values of the offset and the length of the values of the elements, and most of the values became fine except some values that came with a byte less:
value : blabla , offset : 456 , length : 6
...
...
value : blabl , offset : 6662 , length : 5
anyone knows what the hell is going on in this class...
PS: i�ve extend the Class DefaultHandler of org.xml.sax.helpers.DefaultHandler;
PS2: the XML file it�s fine!! The values are OK!!!
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm afraid "NpsFerreira Ferreira" does not quite fulfill the "real-looking" part of our naming policy so I'll have to ask you to change your display name.
Thanks.
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, "Bignpsf" is still not valid. We require a first name (or first initial) and a lastname and they need to be real-looking. The naming policy explains these requirements.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just answered this question in the Advanced Java forum. It is really annoying when people post the same question in multiple forums.
 
reply
    Bookmark Topic Watch Topic
  • New Topic