Last post Oct 20, 2010 09:13 AM by kuul13
Oct 18, 2010 04:12 PM|kuul13|LINK
I have a XMLDataSource somewhat like:
I am storing these in a asp:formview. I am able to store author and publication values but not sure how can I store the value of book name? Actually I just want to use condition that I need to store "name" if "genere=Romance". something like this. I know
we can use contition/expression in XPath method but if it is an attribute like <book genere="romance">. Can someone throw light on this question.
xml .Net c# xpath
Oct 18, 2010 05:55 PM|sansan|LINK
You can use this XPath expression
You can get more info on various Expressions at http://msdn.microsoft.com/en-us/library/ms256086.aspx
and you can check your expression at
Oct 19, 2010 09:14 AM|kuul13|LINK
Thanks Santosh, but this expression returns the value 'Romance'. How can I get the value of <name> tag which is also in the same level as <genre>?
I checked the links but it doesn't give much idea on how to retrieve it. Help would be appreciated.
Oct 20, 2010 09:13 AM|kuul13|LINK
Someone on another form helped me in resolving the issueby using bookstore/book[genre ='Romance']/Name.