Bug 24676 - XmlSyndicationContent.ReadContent fails to deserialize content
Summary: XmlSyndicationContent.ReadContent fails to deserialize content
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: 3.2.x
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-19 14:13 UTC by josh.gehman
Modified: 2017-09-06 16:55 UTC (History)
1 user (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Code exposing issue (2.15 KB, text/plain)
2014-11-19 14:13 UTC, josh.gehman
Details

Description josh.gehman 2014-11-19 14:13:11 UTC
Created attachment 8809 [details]
Code exposing issue

When reading in ATOM XML that contains a XML content, XmlSyndicationContent.ReadContent fails to deserialize content correctly.  The failure to deserailize does not present itself as an exception, all of the data in the deserialized object are the default values for the data type.

I have determined a work-around for using XmlSyndicationContent.ReadContent
1) Use XmlSyndicationContent.GetReaderAtContent
2) Call read on the returned XmlDictionaryReader to move it into the correct position
3) Then provide the reader to DataContractSerializer.ReadObject


Output of the program when running in .NET

XmlSyndicationContent.ReadContent: 1234
Workaround: 1234

Output of the program when running in Mono

XmlSyndicationContent.ReadContent: 0
Workaround: 1234

Note You need to log in before you can comment on or make changes to this bug.