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!!!
You should be aware that a single call to characters may not include all of the characters in a element due to the fact that SAX works on buffer loads. You need to accumulate characters until the event signifying the end of the element. This question really belongs in the XML forum. Bill