HtmlParsingHelper.TryExtractTagContent Method

Namespace
Kampute.DocToolkit.Support
Assembly
  • Kampute.DocToolkit.dll

Definition

Attempts to extract the content between opening and closing tags with the specified name.
public static bool TryExtractTagContent(string html, string tagName, [NotNullWhen(true)] out string content)

Parameters

html string
The HTML content to search.
tagName string
The name of the tag to search for.
content string
When this method returns, contains the content between the tags, if found; otherwise, null. This parameter is passed uninitialized.

Returns

bool
true if the content was successfully extracted; otherwise, false.