hi everyone.
i just want to know that how can i fetch any paragraph/line written in "p" tag in any website.
i want to recieve a complete article written in any website into my c# window appication.
xzero1 0 Newbie Poster
Recommended Answers
Jump to Poststring htmlstring = string.empty; HttpWebRequest hwRequest = (HttpWebRequest)HttpWebRequest.Create(Url); hwRequest.Method = "GET" HttpWebResponse hwResponse = (HttpWebResponse)hwRequest.GetResponse(); using (StreamReader sr = new StreamReader(hwResponse.GetResponseStream())) { htmlstring = sr.ReadToEnd(); } hwResponse.Close();
then use regular expression to extract "p" tag in htmlstring
All 3 Replies
Reply to this topic Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.