Quantcast
Channel: Active questions tagged atom-feed+rss+parsing - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Sax parsing and encoding

$
0
0

I have a contact that is experiencing trouble with SAX when parsing RSS and Atom files. According to him, it's as if text coming from the Item elements is truncated at an apostrophe or sometimes an accented character. There seems to be a problem with encoding too.

I've given SAX a try and I have some truncating taking place too but haven't been able to dig further. I'd appreciate some suggestions if someone out there has tackled this before.

This is the code that's being used in the ContentHandler:

public void characters( char[], int start, int end ) throws SAXException {
//
    link = new String(ch, start, end);

Edit: The encoding problem might be due to storing information in a byte array as I know Java works in Unicode.


Viewing all articles
Browse latest Browse all 13

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>