VB.net read XML element



I am trying to write an application in VB.net but I stuck and I spend some time searching how to do this but can't get it. What i need is read specific xml element and write it in to the specific label. If someone can give me an example.


I need output like this:



--Book 1---
Title: Everyday Italian
Author: Giada De Laurentiis

--Book 2--
Title: Harry Potter
Author: J K. Rowling

--etc--


XML:



<bookstore>
<book>
<title>Everyday Italian</title>
<author>Giada De Laurentiis</author>
<year>2005</year>
<price>30.00</price>
</book>
<book>
<title>Harry Potter</title>
<author>J K. Rowling</author>
<year>2005</year>
<price>29.99</price>
</book>
<book>
<title>XQuery Kick Start</title>
<author>James McGovern</author>
<year>2003</year>
<price>49.99</price>
</book>
<book>
<title>Learning XML</title>
<author>Erik T. Ray</author>
<year>2003</year>
<price>39.95</price>
</book>


Thank you


No comments:

Post a Comment