ahmed-negm / google-gdata

Automatically exported from code.google.com/p/google-gdata
0 stars 0 forks source link

DocumentEntry's parent folders not added as AtomFeed links #296

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The <link rel="http://schemas.google.com/docs/2007#parent" ..> -elements 
are skipped when parsing an AtomEntry (at AtomFeedParser.ParseEntry).

Reason might be that the type of a <content>-element is not properly caught 
in AtomFeedParser.ParseContent:

 if (content.Type.Equals("xhtml") ||
     content.Type.Equals("html"))
 {
     // ReadInnerXml moves to the next node
     skipNode = false; 
     content.Content = reader.ReadInnerXml(); 
 }

Shouldn't that check be like:
 if (content.Type.Equals("text/xhtml") ||
     content.Type.Equals("text/html"))
?

Since the <content>-element is usually right before the <link>-element for 
a parent folder, the skipNode isn't set, and the next element is skipped 
because of the "if (fSkip)"-block in AtomFeedParser.ParseEntry. I tried 
changing the ParseContent check as above and now ParentFolders are parsed 
fine.

Or am I missing something?

Original issue reported on code.google.com by mikko.junnila on 29 Nov 2009 at 2:29

GoogleCodeExporter commented 9 years ago
Not really. The fix is a tad more complicated, and i just submitted it.

Original comment by fman...@gmail.com on 30 Nov 2009 at 10:16