I'm trying to figure out the best way to unmarshal some data from a public API (meaning I have no control over how it is serialized into XML).
<Show>
<name>Buffy the Vampire Slayer</name>
<totalseasons>7</totalseasons>
<Episodelist>
<Season no="1">
<episode>...</episode>
<episode>...</episode>
<episode>...</episode>
<episode>...</episode>
</Season>
<Season no="2">...</Season>
<Season no="3">...</Season>
</Episodelist>
</Show>
Above is a sample of the XML returned from a ReSTful query. Ideally, I'd like to figure out how to do two things; 1) merge all the season lists into one list of episodes and 2) is it possible to access only child elements and ignore parent elements when unmarshalling XML (ex. Access EpisodeList only, ignoring Show)?
Thank you for any help! This is my first SO post (still fairly new to programming).