I am trying to return a sitemap in an XML format.
it seems to work but is only returning about 2/3 of the actual XML
using (var client = new WebClient())
{
string html = client.DownloadString("https://int.lowrance.com/en-au/sitemap.xml");
var doc = new HtmlDocument();
doc.LoadHtml(html);
var ach = doc.DocumentNode.SelectNodes("//loc");
foreach (var node in ach)
{
var loc = doc.DocumentNode.SelectNodes("//loc");
var inner = node.InnerHtml;
}
}
I have also tried
XmlDocument doc1 = new XmlDocument();
doc1.Load("https://www.lowrance.com/en-au/sitemap.xml");
but when debugging I get the same results.
at first I thought this was working then realized it was not returning all the XML any help would be much appreciate.