I'm using the NPR XML API with C#. I have a story XML object, with three link nodes, with the only difference being the type attribute.
<story id="485432424">
<link type="html">http://www.npr.org/2016/07/10/485432424/with-administrative-corruption-in-afghanistan-u-s-troops-presence-won-t-make-any?ft=nprml&f=1149</link>
<link type="api">http://api.npr.org/query?id=485432424&apiKey=MDIxNjY4ODAwMDE0NTAxMjAwODQ4ZTA1Nw000</link>
<link type="short">http://n.pr/29EFodu</link>
I know I could deserialize these links into an array, and call something like story.Links[0] to get the html link version, but that seems like poor design. What would be preferable is to have an HTML, API, and Short property directly in my Story object, so I could access it like this: story.Link.HTML or story.Link.API.
Is there any way to achieve this with the Microsoft XML library? I haven't found any decorator that would do something like this, unfortunately.