I am trying to make my code works in the separate thread but can't get it. Tried with few thread examples and delegate that I found on the internet but nothing fixed my problem.
I need to load data from XML file using XML URL and show XML data in labels. Loading is sometimes long and my application is not responding when loading is in process.
I don't know what else should I try. Sorry if I made a post and answer is already there on Stackoverflow, but I can't find code that is working for me.
Thank you all
Example of code for XML load
Dim xmlRoot1 As XElement = XDocument.Load("http://ift.tt/1BH4Rdy").Root
Label1.Text = xmlRoot1.<bookstore>.<book>(0).<title>.Value
Label2.Text = xmlRoot1.<bookstore>.<book>(1).<title>.Value
.
.
.
etc
And XML structure
<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>
</bookstore>
</xml>
No comments:
Post a Comment