How to clean HTML tags using C# -


उदाहरण के लिए:

  & lt; html xmlns = "http: //www.w3 .org / 1999 / एक्सएचटीएमएल "xml: lang =" en "lang =" en "& gt; & Lt; शीर्ष & gt; & Lt; title & gt; शीर्षक & lt; / title & gt; & Lt; / head & gt; & LT; बॉडी & gt; & Lt; a href = "aaa.asp? Id = 1" & gt; मैं यह टेक्स्ट प्राप्त करना चाहता हूं & lt; / a & gt; & Lt; div & gt; & Lt; h1 & gt; यह मेरी इच्छा है !! & lt; / h1 & gt; & Lt; b & gt; यह मेरी इच्छा है !!! & lt; / b & gt; & Lt; / div & gt; & Lt; / body & gt; & Lt; / html & gt;  

और इसका नतीजा यह है:

  मुझे यह टेक्स्ट प्राप्त करना है यह मेरी इच्छा है !! यह मेरी इच्छा है !!!  

:

  HtmlDocument डॉक = नया HTML दस्तावेज़ ( ); doc.LoadHtml (एचटीएमएल); स्ट्रिंग s = doc.DocumentNode.SelectSingleNode ("// body")। इनरटेक्स्ट;  

Comments

Popular posts from this blog

c++ - Linux and clipboard -

Visual Studio 2005: How to speed up builds when a VSMDI is open? -

booting ubuntu from usb using virtualbox -