{"id":26012399,"url":"https://github.com/clarius/web","last_synced_at":"2026-04-19T15:34:38.253Z","repository":{"id":45018428,"uuid":"400327827","full_name":"clarius/Web","owner":"clarius","description":"Official docs site for https://github.com/devlooped/Web","archived":false,"fork":false,"pushed_at":"2026-03-12T21:04:54.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"gh-pages","last_synced_at":"2026-03-13T00:18:04.770Z","etag":null,"topics":["css","html","scraping","xml"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/clarius.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.html","contributing":null,"funding":null,"license":"license.txt","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":"2021-08-26T23:04:18.000Z","updated_at":"2026-03-12T21:04:58.000Z","dependencies_parsed_at":"2024-05-17T23:29:00.352Z","dependency_job_id":"ebc7479a-99e9-4823-8ebe-d227530b10c7","html_url":"https://github.com/clarius/Web","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/clarius/Web","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarius%2FWeb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarius%2FWeb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarius%2FWeb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarius%2FWeb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clarius","download_url":"https://codeload.github.com/clarius/Web/tar.gz/refs/heads/gh-pages","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clarius%2FWeb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32012283,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["css","html","scraping","xml"],"created_at":"2025-03-06T00:30:44.055Z","updated_at":"2026-04-19T15:34:38.238Z","avatar_url":"https://github.com/clarius.png","language":"HTML","funding_links":["https://github.com/sponsors/devlooped","https://github.com/sponsors"],"categories":[],"sub_categories":[],"readme":"![Icon](https://raw.githubusercontent.com/devlooped/web/main/assets/icon.png) HTML =\u003e XML + CSS with XLinq 🤘\n============\n\n[![EULA](https://img.shields.io/badge/EULA-OSMF-blue?labelColor=black\u0026color=C9FF30)](osmfeula.txt)\n[![OSS](https://img.shields.io/github/license/devlooped/web.svg?color=blue)](https://github.com/devlooped/web/blob/main/license.txt)\n[![Version](https://img.shields.io/nuget/vpre/Devlooped.Web.svg?color=royalblue)](https://www.nuget.org/packages/Devlooped.Web)\n[![Downloads](https://img.shields.io/nuget/dt/Devlooped.Web.svg?color=green)](https://www.nuget.org/packages/Devlooped.Web)\n\n\u003c!-- include https://github.com/devlooped/.github/raw/main/osmf.md --\u003e\n## Open Source Maintenance Fee\n\nTo ensure the long-term sustainability of this project, users of this package who generate \nrevenue must pay an [Open Source Maintenance Fee](https://opensourcemaintenancefee.org). \nWhile the source code is freely available under the terms of the [License](license.txt), \nthis package and other aspects of the project require [adherence to the Maintenance Fee](osmfeula.txt).\n\nTo pay the Maintenance Fee, [become a Sponsor](https://github.com/sponsors/devlooped) at the proper \nOSMF tier. A single fee covers all of [Devlooped packages](https://www.nuget.org/profiles/Devlooped).\n\n\u003c!-- https://github.com/devlooped/.github/raw/main/osmf.md --\u003e\n\n\u003c!-- #content --\u003e\nRead HTML as XML and query it with CSS over XLinq (or HtmlAgilityPack killer 😉). \nProvides `HtmlDocument.Load` and `CssSelectElement(s)` extension methods \nfor `XDocument`/`XElement`.\n\nNo need to learn an entirely new object model for a page 🤘. \nThis makes it the most productive and lean library for web \nscraping using the latest and greatest that .NET can offer.\n\n# Usage\n\n```csharp\nusing System.Xml.Linq;\nusing Devlooped.Web;\n\nXDocument page = HtmlDocument.Load(\"page.html\")\nIEnumerable\u003cXElement\u003e elements = page.CssSelectElements(\"div.menuitem\");\n\nXElement title = page.CssSelectElement(\"html head meta[name=title]\");\n```\n\nBy default, `HtmlDocument.Load` will skip non-content elements `script` and \n`style`, turn all element names into lower case, and ignore all XML namespaces \n(useful when loading XHTML, for example) for easier querying. These options \nas well as granular whitespace handling can be configured using the overloads \nreceiving an `HtmlReaderSettings`.\n\nThe underlying parsing is performed by the amazing [SgmlReader](https://www.nuget.org/packages/Microsoft.Xml.SgmlReader) \nlibrary by Microsoft's [Chris Lovett](http://lovettsoftware.com/).\n\nIn addition, the following extension methods make it easier to work \nwith XML documents where you want to query with CSS or XPath without \nhaving to deal with XML namespaces:\n\n```csharp\nusing System.Xml;\nusing System.Xml.Linq;\nusing Devlooped.Web;\n\nvar doc = XDocument.Load(\"doc.xml\")\n// Will remove all xmlns declarations, and allow querying elements \n// as if none had namespaces, returns the root element\nXElement nons = doc.RemoveNamespaces();\n\n// Alternatively, you can also ignore at the XmlReader level\nusing var reader = XmlReader.Create(\"doc.xml\").IgnoreNamespaces();\ndoc = XDocument.Load(reader);\n\n// Finally, you can also skip elements at the reader level\nusing var reader = XmlReader.Create(\"doc.xml\").SkipElements(\"foo\", \"bar\");\ndoc = XDocument.Load(reader);\n```\n\n## CSS\n\nAt the moment, supports the following CSS selector features: \n\n- [Type selector](https://www.w3.org/TR/selectors-3/#type-selectors)\n- [Universal selector](https://www.w3.org/TR/selectors-3/#universal-selector)\n- [Attribute selector](https://www.w3.org/TR/selectors-3/#attribute-selectors)\n- [Class selector](https://www.w3.org/TR/selectors-3/#class-html)\n- [ID selector](https://www.w3.org/TR/selectors-3/#id-selectors)\n- [Pseudo-classes](https://www.w3.org/TR/selectors-3/#pseudo-classes):\n    * [:checked](https://www.w3.org/TR/selectors-3/#checked)\n    * [:first-child](https://www.w3.org/TR/selectors-3/#first-child-pseudo)\n    * [:last-child](https://www.w3.org/TR/selectors-3/#last-child-pseudo)\n    * [:only-child](https://www.w3.org/TR/selectors-3/#only-child-pseudo)\n    * [:empty](https://www.w3.org/TR/selectors-3/#empty-pseudo)\n    * [:first-of-type](https://www.w3.org/TR/selectors-3/#first-of-type-pseudo)\n    * [:last-of-type](https://www.w3.org/TR/selectors-3/#last-of-type-pseudo)\n    * [:not(...)](https://www.w3.org/TR/selectors-3/#negation)\n    * [:nth-of-type(n)](https://www.w3.org/TR/selectors-3/#nth-of-type-pseudo)\n    * [:nth-child(n)](https://www.w3.org/TR/selectors-3/#nth-child-pseudo)\n    * [:has(...)](https://www.w3.org/TR/selectors-4/#has-pseudo)\n\nAnd all [combinators](https://www.w3.org/TR/selectors-3/#combinators)\n\nNon-CSS features:\n\n- `text()` pseudo-attribute selector: selects the node text contents, as specified \n  in the [XPath](https://www.w3.org/TR/1999/REC-xpath-19991116/) `text()` location \n  path. Can be used instead of an attribute name selector, such as `div[text()=foo]`. \n  All [attribute value selectors](https://www.w3.org/TR/selectors-3/#attribute-selectors) \n  are also supported:\n    * `[text()=val]`: Represents an element whose text contents is exactly \"val\".\n    * `[text()~=val]`: Represents an element whose text contents is a whitespace-separated list of words, \n       one of which is exactly \"val\". If \"val\" contains whitespace, it will never represent anything (since the words \n       are separated by spaces). Also if \"val\" is the empty string, it will never represent anything.\n    * `[text()|=val]`: Represents an element whose text contents either being exactly \"val\" or \n       beginning with \"val\" immediately followed by \"-\" (U+002D). \n    * `[text()^=val]`: Represents an element whose text contents begins with the prefix \"val\". \n       If \"val\" is the empty string then the selector does not represent anything.\n    * `[text()$=val]`: Represents an element whose text contents ends with the suffix \"val\". \n       If \"val\" is the empty string then the selector does not represent anything.\n    * `[text()*=val]`: Represents an element whose text contents contains at least one instance of the \n       substring \"val\". If \"val\" is the empty string then the selector does not represent anything.\n\n\u003c!-- #content --\u003e\n\n# Dogfooding\n\n[![CI Version](https://img.shields.io/endpoint?url=https://shields.kzu.app/vpre/Devlooped.Web/main\u0026label=nuget.ci\u0026color=brightgreen)](https://pkg.kzu.app/index.json)\n[![Build](https://github.com/devlooped/web/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/devlooped/web/actions)\n\nWe also produce CI packages from branches and pull requests so you can dogfood builds as quickly as they are produced. \n\nThe CI feed is `https://pkg.kzu.app/index.json`. \n\nThe versioning scheme for packages is:\n\n- PR builds: *42.42.42-pr*`[NUMBER]`\n- Branch builds: *42.42.42-*`[BRANCH]`.`[COMMITS]`\n\n\n\u003c!-- #sponsors --\u003e\n\u003c!-- include https://github.com/devlooped/sponsors/raw/main/footer.md --\u003e\n# Sponsors \n\n\u003c!-- sponsors.md --\u003e\n[![Clarius Org](https://avatars.githubusercontent.com/u/71888636?v=4\u0026s=39 \"Clarius Org\")](https://github.com/clarius)\n[![MFB Technologies, Inc.](https://avatars.githubusercontent.com/u/87181630?v=4\u0026s=39 \"MFB Technologies, Inc.\")](https://github.com/MFB-Technologies-Inc)\n[![Khamza Davletov](https://avatars.githubusercontent.com/u/13615108?u=11b0038e255cdf9d1940fbb9ae9d1d57115697ab\u0026v=4\u0026s=39 \"Khamza Davletov\")](https://github.com/khamza85)\n[![SandRock](https://avatars.githubusercontent.com/u/321868?u=99e50a714276c43ae820632f1da88cb71632ec97\u0026v=4\u0026s=39 \"SandRock\")](https://github.com/sandrock)\n[![DRIVE.NET, Inc.](https://avatars.githubusercontent.com/u/15047123?v=4\u0026s=39 \"DRIVE.NET, Inc.\")](https://github.com/drivenet)\n[![Keith Pickford](https://avatars.githubusercontent.com/u/16598898?u=64416b80caf7092a885f60bb31612270bffc9598\u0026v=4\u0026s=39 \"Keith Pickford\")](https://github.com/Keflon)\n[![Thomas Bolon](https://avatars.githubusercontent.com/u/127185?u=7f50babfc888675e37feb80851a4e9708f573386\u0026v=4\u0026s=39 \"Thomas Bolon\")](https://github.com/tbolon)\n[![Kori Francis](https://avatars.githubusercontent.com/u/67574?u=3991fb983e1c399edf39aebc00a9f9cd425703bd\u0026v=4\u0026s=39 \"Kori Francis\")](https://github.com/kfrancis)\n[![Reuben Swartz](https://avatars.githubusercontent.com/u/724704?u=2076fe336f9f6ad678009f1595cbea434b0c5a41\u0026v=4\u0026s=39 \"Reuben Swartz\")](https://github.com/rbnswartz)\n[![Jacob Foshee](https://avatars.githubusercontent.com/u/480334?v=4\u0026s=39 \"Jacob Foshee\")](https://github.com/jfoshee)\n[![](https://avatars.githubusercontent.com/u/33566379?u=bf62e2b46435a267fa246a64537870fd2449410f\u0026v=4\u0026s=39 \"\")](https://github.com/Mrxx99)\n[![Eric Johnson](https://avatars.githubusercontent.com/u/26369281?u=41b560c2bc493149b32d384b960e0948c78767ab\u0026v=4\u0026s=39 \"Eric Johnson\")](https://github.com/eajhnsn1)\n[![Jonathan ](https://avatars.githubusercontent.com/u/5510103?u=98dcfbef3f32de629d30f1f418a095bf09e14891\u0026v=4\u0026s=39 \"Jonathan \")](https://github.com/Jonathan-Hickey)\n[![Ken Bonny](https://avatars.githubusercontent.com/u/6417376?u=569af445b6f387917029ffb5129e9cf9f6f68421\u0026v=4\u0026s=39 \"Ken Bonny\")](https://github.com/KenBonny)\n[![Simon Cropp](https://avatars.githubusercontent.com/u/122666?v=4\u0026s=39 \"Simon Cropp\")](https://github.com/SimonCropp)\n[![agileworks-eu](https://avatars.githubusercontent.com/u/5989304?v=4\u0026s=39 \"agileworks-eu\")](https://github.com/agileworks-eu)\n[![Zheyu Shen](https://avatars.githubusercontent.com/u/4067473?v=4\u0026s=39 \"Zheyu Shen\")](https://github.com/arsdragonfly)\n[![Vezel](https://avatars.githubusercontent.com/u/87844133?v=4\u0026s=39 \"Vezel\")](https://github.com/vezel-dev)\n[![ChilliCream](https://avatars.githubusercontent.com/u/16239022?v=4\u0026s=39 \"ChilliCream\")](https://github.com/ChilliCream)\n[![4OTC](https://avatars.githubusercontent.com/u/68428092?v=4\u0026s=39 \"4OTC\")](https://github.com/4OTC)\n[![domischell](https://avatars.githubusercontent.com/u/66068846?u=0a5c5e2e7d90f15ea657bc660f175605935c5bea\u0026v=4\u0026s=39 \"domischell\")](https://github.com/DominicSchell)\n[![Adrian Alonso](https://avatars.githubusercontent.com/u/2027083?u=129cf516d99f5cb2fd0f4a0787a069f3446b7522\u0026v=4\u0026s=39 \"Adrian Alonso\")](https://github.com/adalon)\n[![torutek](https://avatars.githubusercontent.com/u/33917059?v=4\u0026s=39 \"torutek\")](https://github.com/torutek)\n[![mccaffers](https://avatars.githubusercontent.com/u/16667079?u=110034edf51097a5ee82cb6a94ae5483568e3469\u0026v=4\u0026s=39 \"mccaffers\")](https://github.com/mccaffers)\n[![Seika Logiciel](https://avatars.githubusercontent.com/u/2564602?v=4\u0026s=39 \"Seika Logiciel\")](https://github.com/SeikaLogiciel)\n[![Andrew Grant](https://avatars.githubusercontent.com/devlooped-user?s=39 \"Andrew Grant\")](https://github.com/wizardness)\n[![Lars](https://avatars.githubusercontent.com/u/1727124?v=4\u0026s=39 \"Lars\")](https://github.com/latonz)\n[![prime167](https://avatars.githubusercontent.com/u/3722845?v=4\u0026s=39 \"prime167\")](https://github.com/prime167)\n\n\n\u003c!-- sponsors.md --\u003e\n[![Sponsor this project](https://avatars.githubusercontent.com/devlooped-sponsor?s=118 \"Sponsor this project\")](https://github.com/sponsors/devlooped)\n\n[Learn more about GitHub Sponsors](https://github.com/sponsors)\n\n\u003c!-- https://github.com/devlooped/sponsors/raw/main/footer.md --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarius%2Fweb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclarius%2Fweb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclarius%2Fweb/lists"}