How can I get the HTML or DOM from a webpage with XML?

N

needin4mation

Used to I could use XMLHTTP Request, but I cannot do that anymore (I
think) with C# .net. Here is what I tried, but it of course failed:

string strXMLsrc = "http://www.somewebpage.com";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(strXMLsrc);
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
Response.Write(strXMLsrc);


I know I'm not really using the stringbuilder and stringwriter. I'm
not sure how here.

Thank you for any help. I just want to display the HTML of the page,
not display the page again. I will have to parse the HTML to find a
control on it, but that is another story. Thanks for any help.
 
N

needin4mation

What objects replace the above for retrieving web pages for parsing?
Anything?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top