I have for example the following data in an xml file:
<Critic-List>
<bruce-bennett>
<Movie Title="White House Down (2013)" Score="C+" Like="false"/>
<Movie Title="Despicable Me 2 (2013)" Score="A-" Like="true"/>
<Movie Title="World War Z (2013)" Score="B+" Like="true"/>
<Movie Title="Man of Steel (2013)" Score="B+" Like="true"/>
how do i write a code which
- selects a node by attribute- say attribute(title)="Despicable Me 2 (2013)"
- and from that selected node gives the value for another attribute of that node- for instance: attribute(like)... (which in this case would return "true")
XML readers in C# seems more geared towards returning "inner text" rather than attribute values, I'm wondering if maybe I should have stored my xml data in inner text rather than attributes.. to me it would be much more convenient to retrieve the data values of attributes, but i'm not sure if those parameters exist...
any help or suggested reading would be much appreciated!