Пример #1
0
 /// <summary>
 /// Removes non-body elements from HTML and then strips all markup and returns the result.
 /// </summary>
 /// <param name="html">The HTML.</param>
 /// <returns>Body text without markup</returns>
 /// <example>
 /// Example markup:
 /// &lt;html&gt;&lt;head&gt;&lt;title&gt;Document Title&lt;/title&gt;&lt;head&gt;&lt;body style="color: black;"&gt;&lt;p&gt;This is some text&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
 /// Result after markup-strip:
 /// This is some text
 /// </example>
 /// <remarks>
 /// This method is very helpful whenever a potentially complete HTML string needs to be
 /// displayed as a portion of a larger HTML output.
 /// </remarks>
 public static string GetStrippedBodyOnly(this string html)
 {
     return(MarkupHelper.GetStrippedBodyOnly(html));
 }