Click here to Skip to main content
16,022,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i am using WebBrowser Control in my application

the WebBrowser Navigates to the url

http://feeds.bbci.co.uk/news/rss.xml[^]

once the Document Completed Event of WebBrowser is Fired, i am showing the source code by MessageBox.s(WebBrowser1.DocumentText);

by it appears that the shown source code is different than actual

shown code contains html tags where as the url is of an XML file

what i need is the same text as it is in XML

one thing to remember, i do need to use webbrowser control, i have tried httpwebrequest, webclient etc none work, only webbrowser is able to get the XML page but it renders it to HTML so i cant get actual xml

hoping to get soem help
Posted
Updated 18-Sep-20 5:34am
v2

If your getting the full url tag with the html tags with the string then why not use regex or string replace methods to get rid of the tags.

"<.*>", ""

Then it leaves the text only and is less burdensome with more code or dependencies.
 
Share this answer
 
Do you really need WebBrowser control? If you don't want to show a web page embedded in your application, you better use WebClient[^] class.
See also:
http://www.dotnetperls.com/webclient[^]
HTTP GET with .NET WebClient[^]
Or even better, read the xml directly:
http://www.geekpedia.com/tutorial147_Creating-an-RSS-feed-reader-in-Csharp.html[^].
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900