473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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.

Nov 19 '05 #1
2 984
What objects replace the above for retrieving web pages for parsing?
Anything?

Nov 19 '05 #2
the WebClient class replaces XMLHTTP.

-- bruce (sqlwork.com)

<ne***********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
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.

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: James Bond 007 | last post by:
I am a novice to Javascript (can do simple text-based pop-ups, but not familiar with variable manipulation). I would like to have a Javascript that gives me the start time (I don't care about...
1
by: teknowbabble | last post by:
I would like to know how to convert HTML code that users input into a TEXTAREA box on a HTML FORM into a separate WEBPAGE. I have something like the diagram below on my webpage. The user is...
4
by: Zuel | last post by:
Hi Folks. So I have a small problem. My DoPostBack function is not writen to the HTML page nor are the asp:buttons calling the DoPostBack. My Goal is to create a totaly dynamic web page where...
7
by: kapdan01 | last post by:
Greetings, I am presently trying to display chinese characters on a webpage (HTML). I have tried changing the charset to big5, UTF-8 to no avail. Word documents display correctly, as does...
2
by: Andrew Neiderer | last post by:
This is simple HTML, Java but I am really confused. I include the code since it is so small - ---------------------------------------------------------------------------- -- test.html -- ...
9
by: loretta | last post by:
This code is just reading html and printing , eventually I want to modify the html. However, the original html contains javascript and the output html contains tags not in the original. $url =...
5
by: Orv | last post by:
I have a database set up where I want to export the records to a cd. I want to be able to create an autorun cd and have it based on HTML so when it opens, the user can click on various links and it...
4
by: Finn Stampe Mikkelsen | last post by:
Hi Is there any way to make the textbox property show html, like a textarea on a webpage would?? I have a webapplication that saves an textarea complete with html tags and everything... ...
5
sid0404
by: sid0404 | last post by:
Hi I am new to the visualstudio.net I am trying to develop an application which requires me to send data to a HTML webpage - http://patft.uspto.gov/netahtml/PTO/search-bool.html and the user...
3
by: maheshgupta0248 | last post by:
Hi all, I have developed some cgis in c-language for our project. We have only CGIs for developing webpages. When I start the webserver and request for the webpage.. I see some html headers on...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.