J
Jonathan
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!!
:
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!!