With the WebUtilty in UWP you can directly read Json returns and then search via SelectNode
The example shown shows how to read a web page into an HTML document
{} HtmlAgilityPack.HtmlDocument
//< get HTMLdocument > //*create and load to local HtmlDocument HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(sHTML); //</ get HTMLdocument >
|
Then you can, for example, output all TD nodes with a specific class or class name
HtmlNodeCollection nodes = doc.DocumentNode.SelectNodes(".//td[contains(@class, 'col2')]"); |
//< download > HtmlDocument doc = await clsHtmlDoc.Web_Get_HtmlDocument(sURL); if (doc == null) return false; //</ download >
//< get Max Pages > //*read Json pages from HTMLDocument-Node if (intPages_Max==0) { HtmlNode docNode = doc.DocumentNode; int posPages = docNode.InnerText.IndexOf("pages\":"); int posPagesEnd = docNode.InnerText.IndexOf(",",posPages); posPages = posPages + "pages\":".Length; string sPages = docNode.InnerText.Substring(posPages, posPagesEnd - posPages); int intPages = 0; bool isNumeric = int.TryParse(sPages, out intPages); if (isNumeric) { intPages_Max = intPages; } } //</ get Max Pages >
|