[Mono-dev] [PATCH] Correctly handle <source> tags in Atom10ItemFormatter

Carlos Martín Nieto carlos at cmartin.tk
Wed Jun 9 08:43:37 EDT 2010


Hello,

 When System.ServiceModel.Syndication.Atom10ItemFormatter.ReadXml()
finds a <source> tag, it hands if off to ReadSourceFeed() which hands if
off to Atom10FeedFormatter.ReadFrom() which tries to load the inner
elements as though it were the contents of a normal feed.

 This doesn't work, however, because Atom10FeedFormatter checks for a
<feed> tag (which it doesn't find) and throws an exception complaining
that "title" isn't a valid element (which took me a while to decipher).

 The attached patch walks through the child elements of <source> and
adds this information to a generic SyndicationFeed().

 (The ChangeLog diff shows another commit from me. If that's a problem,
I can re-diff without it)

 Should I open a bug report for this?

 Thanks,

   cmn
-- 
Carlos Martín Nieto | http://www.cmartin.tk

"¿Cómo voy a decir bobadas si soy mudo?" -- CACHAI
-------------- next part --------------
A non-text attachment was scrubbed...
Name: atom10-source-tag.patch
Type: text/x-patch
Size: 2718 bytes
Desc: Handle <source> tags correctly
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20100609/14fe6158/attachment.bin 


More information about the Mono-devel-list mailing list