ProSol.Html.TagsProvider
2.0.0-rc0.5
This is a prerelease version of ProSol.Html.TagsProvider.
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package ProSol.Html.TagsProvider --version 2.0.0-rc0.5
NuGet\Install-Package ProSol.Html.TagsProvider -Version 2.0.0-rc0.5
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ProSol.Html.TagsProvider" Version="2.0.0-rc0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ProSol.Html.TagsProvider --version 2.0.0-rc0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ProSol.Html.TagsProvider, 2.0.0-rc0.5"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install ProSol.Html.TagsProvider as a Cake Addin #addin nuget:?package=ProSol.Html.TagsProvider&version=2.0.0-rc0.5&prerelease // Install ProSol.Html.TagsProvider as a Cake Tool #tool nuget:?package=ProSol.Html.TagsProvider&version=2.0.0-rc0.5&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ProSol.Html.TagsProvider
TagsProvider is a tool for extracting HTML tags from a string, in event-driven way. Helps to extract text, structured data, from a specific site.
How to use?
Install the package:
dotnet add package ProSol.Html.TagsProvider
Make an Observer:
internal class ConsoleLogObserver : IObserver<TagsProviderMessage>
{
public void OnCompleted() { }
public void OnError(Exception error) { }
public void OnNext(TagsProviderMessage value)
{
Console.WriteLine(value.CurrentTag.TagInfo.Name);
}
}
Run the TagsProvider:
var provider = new TagsProvider();
using var unsub = provider.Subscribe(new ConsoleLogObserver());
provider.Process("<div> <span> </span> </div>");
Get the output:
span
div
That's it! The provider notifies about any tag met and its data:
- name,
- range of entire tag,
- range of inner content.
More demos here.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on ProSol.Html.TagsProvider:
Package | Downloads |
---|---|
ProSol.WebScrap
A HTML parser, for extracting the text from a web pages, with CSS selectors. |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
2.0.0 | 666 | 12/8/2023 |
2.0.0-rc2.0 | 72 | 12/8/2023 |
2.0.0-rc1.4 | 64 | 12/5/2023 |
2.0.0-rc1.3 | 91 | 12/2/2023 |
2.0.0-rc1.2 | 73 | 12/2/2023 |
2.0.0-rc1.1 | 78 | 12/2/2023 |
2.0.0-rc1.0 | 68 | 12/2/2023 |
2.0.0-rc0.5 | 96 | 11/24/2023 |
2.0.0-rc0.4 | 84 | 11/23/2023 |
2.0.0-rc0.3 | 79 | 11/23/2023 |
2.0.0-rc0.2 | 78 | 11/21/2023 |
2.0.0-rc0.1 | 81 | 11/19/2023 |
1.0.2 | 464 | 11/7/2023 |
1.0.1-a | 398 | 11/7/2023 |