We don’t really need the first column as it is not important. And since the first row, is useless to us, we start looping from the 2nd row. Now that we’ve got a whole collection of rows, we can loop through the rows to get to each of the columns. which should look like this for the very first row. Otherwise, make sure your Regular Expression is correct. If your table appears in the MessageDialog as the image below, you get the green light to continue. You can show another MessageDialog for testing purposes. We need to get the table out of it by using MatchCollection and Regex. Now what we need to do is to filter the HTML page which is now in String format. As you can see, the response message is the whole HTML code of that page. Else, make sure your Uri is specified correctly. If you see the MessageDialog is the same as the image below, then you’re on the right track. Now lets see whether we get the correct response message by showing the whole response message in a MessageDialog. After we receive the HttpResponseMessage, we convert it to a readable String(also asynchronous function). However, the ‘await’ operator must be within an Async method. This is because the request function is an Asynchronous function thus it has to awaitable.
Notice the the line of code is underlined in red. Next, we need to send a HttpRequest to the specified Uri to get a HttpResponseMessage. Import necessary reference if not imported yet. First create a HttpClient and a Uri which links to. Then, open file to start retrieve the data. First, create a new class of Object which contains 4 properties which are : IndexNo in Int, Name in String, PokemonImage in Uri and RarityImage in Uri. So let’s create a new project and start with the tutorial already. It contains a table of Pokemon Cards of their name, images and rarity of that set. I’ll be using this site for the tutorial : which looks like this.
How’s things going? Hope you’re eager to learn how to retrieve data from internet as this tutorial is gonna do just that.