Hi,

  yesterday I bitched about all the issues I have with the kXML
parser. 
(http://groups.google.com/group/android-developers/browse_thread/thread/db2c614556cd9fa7/)

  So now I converted my code to use DOM. And I tried the third example
from my referenced mail and it gives me an exception too.

  I get a SAXParseExeption when parsing an atom feed from Google Reader:

org.xml.sax.SAXParseException: Illegal: ]]> (position:START_TAG
<category term='user/xyz/state/com.google/fresh'>@5:15061 in
java.io.bufferedrea...@4348a0e8)
        at 
org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:151)
        at com.newsrob.U.parseXMLfromInputStream(U.java:45)
        at 
com.newsrob.EntriesRetriever.fetchNewEntries(EntriesRetriever.java:299)
        at 
com.newsrob.SynchronizationService$4.run(SynchronizationService.java:172)
        at 
com.newsrob.SynchronizationService.doSync(SynchronizationService.java:337)
        at 
com.newsrob.SynchronizationService.access$0(SynchronizationService.java:86)
        at 
com.newsrob.SynchronizationService$1.run(SynchronizationService.java:75)
        at java.lang.Thread.run(Thread.java:935)

 I think the problem originates here (see the last category tag):

<category term="user/xyz/state/com.google/reading-list"
scheme="http://www.google.com/reader/"; label="reading-list"/><category
term="user/xyz/state/com.google/fresh"
scheme="http://www.google.com/reader/"; label="fresh"/><category
term="&lt;![CDATA[ Agenda ]]&gt;"/>

 Any idea why this happens?

 This is the (abbreviated) code I use to parse the stream from Google Reader.

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
dbf.setCoalescing(true); // added this later with no effect
                
DocumentBuilder builder = dbf.newDocumentBuilder();

BufferedReader br = new BufferedReader(new
InputStreamReader(is,"UTF-8"), 8 * 1024);
builder.parse(new InputSource(br));

  Any help is appreciated.

  Is there a third parser on Android, besides Harmony's SAXParser and
kXML's Pull Parser?

Cheers,
Mariano

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to