The problem has been solved by ignoring any fatal errors. Here is a code:
public class DocsFeed extends DefaultHandler {
public void startElement(String uri, String localName, String qName, Attributes attrs) {
...
}
public void endElement(String uri, String localName, String qName) {
...
}
public void characters(char[] ch, int start, int length) {
...
}
public void fatalError(SAXParseException ex) {
/* don't do anything, just ignore it */
}
}
This solutions allowed me to successfully parse XML document. Once more notice please that XML document was valid. Probably, this is a bug in SAX parser implementation by Nokia.
0 comments:
Post a Comment