{"id":20036838,"url":"https://github.com/vborovikov/brackets","last_synced_at":"2026-03-10T11:07:24.357Z","repository":{"id":199942679,"uuid":"691418632","full_name":"vborovikov/brackets","owner":"vborovikov","description":"Resilient markup parser library","archived":false,"fork":false,"pushed_at":"2025-06-14T00:45:51.000Z","size":1124,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-20T08:44:16.789Z","etag":null,"topics":["csharp","dotnet","html-parser","html-parser-library","html-parsing","parser","xml-parser","xml-parser-library","xml-parsing"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vborovikov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-09-14T06:26:31.000Z","updated_at":"2025-05-16T03:21:40.000Z","dependencies_parsed_at":"2023-10-14T16:21:55.552Z","dependency_job_id":"bbc79f88-f11d-475f-bd68-d68cae166130","html_url":"https://github.com/vborovikov/brackets","commit_stats":null,"previous_names":["vborovikov/brackets"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/vborovikov/brackets","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vborovikov%2Fbrackets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vborovikov%2Fbrackets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vborovikov%2Fbrackets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vborovikov%2Fbrackets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vborovikov","download_url":"https://codeload.github.com/vborovikov/brackets/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vborovikov%2Fbrackets/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30331663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","dotnet","html-parser","html-parser-library","html-parsing","parser","xml-parser","xml-parser-library","xml-parsing"],"created_at":"2024-11-13T10:16:59.954Z","updated_at":"2026-03-10T11:07:24.334Z","avatar_url":"https://github.com/vborovikov.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brackets\nResilient markup parser library\n\n[![Downloads](https://img.shields.io/nuget/dt/Brackets.svg)](https://www.nuget.org/packages/Brackets#versions-body-tab)\n[![NuGet](https://img.shields.io/nuget/v/Brackets.svg)](https://www.nuget.org/packages/Brackets)\n[![BSD-3-Clause](https://img.shields.io/badge/license-BSD--3--Clause-blue.svg)](https://github.com/vborovikov/brackets/blob/main/LICENSE)\n\nThe library is used to parse HTML, XML, and XHTML documents and streams. The parser produces a tree of nodes that represent the structure of the document. The parse tree is very simple by design and doesn't try to replicate the document object model (DOM) in any significant way.\n\nIll-structured documents will be parsed without errors. The parser will try to detect and correct stray tags, broken tags, etc.\n\n## Usage\n\nBoth HTML and XML parsers are derived from the `MarkupParser\u003cTMarkupLexer\u003e` class and are used in the same way. You can access the parsers using the `Document.Html` and the `Document.Xml` static properties or by instantiating the `HtmlParser` and the `XmlParser` classes. The parsers provided by the static properties of the `Document` class are thread-safe and can be used in multiple threads simultaneously. The parsers instantiated directly are not thread-safe but can be slightly faster.\n\nTo parse a document from a string, use the `Parse` method of the `MarkupParser` class.\n\n```csharp\n// Parse a string\nvar document = Document.Html.Parse(\"\u003chtml\u003e\u003chead\u003e\u003c/head\u003e\u003cbody\u003e\u003c/body\u003e\u003c/html\u003e\");\n// Search for a body element using XPath\nvar body = document.Find(\"/html/body\").FirstOrDefault() as ParentTag;\n```\n\nTo parse a document from a file or any stream, use the `ParseAsync` method of the `MarkupParser` class.\n\n```csharp\n// Parse a stream\nvar document = await Document.Html.ParseAsync(stream, cancellationToken);\n// Search for a body element using XPath\nvar body = document.Find(\"/html/body\").FirstOrDefault() as ParentTag;\n```\n\n`ParseAsync` can also accept an `encoding` parameter that specifies the encoding of the document. The default encoding is UTF-8. In any case the parser will automatically detect the encoding of the document from the markup and update it on the fly.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvborovikov%2Fbrackets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvborovikov%2Fbrackets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvborovikov%2Fbrackets/lists"}