awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
paquettg avatar

paquettg/php-html-parser

0
View on GitHub↗
2,402 stars·469 forks·HTML·MIT·2 views

Php Html Parser

PHP HTML Parser is a server-side programming library and DOM parser designed to ingest markup documents and structure them into a navigable parent-child object tree. The library provides a stream-based character lexer and a configurable rule engine that manages parser strictness, whitespace preservation, tag closing behavior, and character encoding detection during document ingestion.

Content loading is handled through a pluggable retrieval layer that accepts local file paths, raw strings, and remote network URLs. Once loaded, documents can be queried using a chainable CSS selector engine that matches selector expressions to filter and return specific node collections.

The library includes a mutable element node model with fluent modification application programming interfaces that allow developers to alter text content, update attributes, and change the structural hierarchy dynamically.

Features

  • HTML and CSS Tools - Finds, filters, and manipulates HTML tags using familiar query syntax as a parsing and crawling library.
  • HTML Parsing - Extracts and queries elements from HTML documents using CSS selectors inside PHP applications.
  • CSS Selector Engines - Queries markup trees and filters collections using chainable CSS-style selector expressions.
  • DOM Tree Construction - Structures parsed markup into a navigable parent-child document object model hierarchy.
  • Element Attribute Updates - Exposes fluent modification APIs allowing developers to alter element attributes, text, and structure dynamically.
  • HTML Parsers - Loads documents from strings, files, or URLs and queries elements using CSS selectors as a PHP parser library.
  • Server Side DOM Manipulation - Modifies document structure, updates node attributes, and alters text content dynamically in server-side code.
  • HTML Document Transformation - Updates node attributes, removes elements from the tree, alters text content, and manages tag properties dynamically.
  • Lexers - Reads raw input strings character by character through an internal state machine to build tokens.
  • Content Abstraction Layers - Abstracts document acquisition to handle local file paths, raw strings, and remote network URLs transparently.
  • HTML DOM Manipulators - Modifies document structure, updates attributes, and alters text content dynamically in PHP scripts.
  • Document Source Loaders - Ingests markup content directly from raw strings, local file paths, or remote web addresses via HTTP requests.

Star history

Star history chart for paquettg/php-html-parserStar history chart for paquettg/php-html-parser

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Curated searches featuring Php Html Parser

Hand-picked collections where Php Html Parser appears.
  • HTML template engine

Open-source alternatives to Php Html Parser

Similar open-source projects, ranked by how many features they share with Php Html Parser.
  • anglesharp/anglesharpAngleSharp avatar

    AngleSharp/AngleSharp

    5,499View on GitHub↗

    AngleSharp is an HTML5 DOM parser and web scraping framework designed to parse HTML5, SVG, and MathML documents into a W3C compliant document object model. It functions as a programmatic HTML generator and a CSS selector engine for querying and locating specific elements within a DOM. The project provides tools for simulating browser environments to automate web interactions, navigate URLs, and submit forms. It includes a dedicated HTML and CSS minifier to reduce the file size of web assets by removing unnecessary characters. The library supports HTML DOM manipulation and the extraction of s

    C#angle-bracketanglesharpc-sharp
    View on GitHub↗5,499
  • scinfu/swiftsoupscinfu avatar

    scinfu/SwiftSoup

    5,087View on GitHub↗

    SwiftSoup is a cross-platform HTML processing library for Swift that converts raw HTML or XML strings and files into a structured document object model. It provides the core infrastructure to parse web content into a traversable tree, enabling programmatic access to page elements across iOS, macOS, and Linux. The library features a CSS selector engine for data extraction and a whitelist-based sanitization system to remove unsafe tags and attributes from user-submitted content. It optimizes repetitive document queries through memoized query caching. The project covers DOM manipulation for upd

    Swift
    View on GitHub↗5,087
  • sunra/php-simple-html-dom-parsersunra avatar

    sunra/php-simple-html-dom-parser

    1,286View on GitHub↗

    php-simple-html-dom-parser is a PHP library for parsing HTML documents into a traversable in-memory tree that handles malformed markup gracefully. It constructs a complete object graph from raw HTML strings while retaining document structure and relational node hierarchies, and supports lazy child node iteration to load descendant nodes on demand for large documents. The library features a CSS selector query engine that translates selector expressions to locate and filter matching nodes within the parsed DOM tree. Programmatic accessors provide direct string-based attribute retrieval to extra

    HTML
    View on GitHub↗1,286
  • puerkitobio/goqueryPuerkitoBio avatar

    PuerkitoBio/goquery

    14,958View on GitHub↗

    goquery is a Go HTML parsing library and CSS selector engine used to isolate and retrieve specific text or attributes from HTML documents. It functions as an HTML DOM manipulator that converts raw HTML strings into a structured tree for programmatic navigation and search. The library provides a fluent interface for chaining selection and filtering operations and utilizes a wrapper-based abstraction to simplify data extraction and manipulation of nodes. It employs an iterator-based processing mechanism to apply operations to every node within a matched selection. Its primary capabilities cove

    Gogoqueryhtml-parsingjquery
    View on GitHub↗14,958
See all 30 alternatives to Php Html Parser→

Frequently asked questions

What does paquettg/php-html-parser do?

PHP HTML Parser is a server-side programming library and DOM parser designed to ingest markup documents and structure them into a navigable parent-child object tree. The library provides a stream-based character lexer and a configurable rule engine that manages parser strictness, whitespace preservation, tag closing behavior, and character encoding detection during document ingestion.

What are the main features of paquettg/php-html-parser?

The main features of paquettg/php-html-parser are: HTML and CSS Tools, HTML Parsing, CSS Selector Engines, DOM Tree Construction, Element Attribute Updates, HTML Parsers, Server Side DOM Manipulation, HTML Document Transformation.

What are some open-source alternatives to paquettg/php-html-parser?

Open-source alternatives to paquettg/php-html-parser include: anglesharp/anglesharp — AngleSharp is an HTML5 DOM parser and web scraping framework designed to parse HTML5, SVG, and MathML documents into a… scinfu/swiftsoup — SwiftSoup is a cross-platform HTML processing library for Swift that converts raw HTML or XML strings and files into a… sunra/php-simple-html-dom-parser — php-simple-html-dom-parser is a PHP library for parsing HTML documents into a traversable in-memory tree that handles… puerkitobio/goquery — goquery is a Go HTML parsing library and CSS selector engine used to isolate and retrieve specific text or attributes… ericchiang/pup — Pup is a command line tool for extracting and filtering data from HTML documents using CSS selectors. It functions as… inikulin/parse5 — parse5 is a WHATWG HTML parser and serializer for Node.js. It transforms HTML strings into a document object model and…