yubarajshrestha/html-dom-parser

This package a simple wrapper around Simple Html Dom Parser library. It provides a simple way to parse html and extract data from it.

v0.0.2 2021-12-09 05:57 UTC

This package is auto-updated.

Last update: 2024-05-09 11:51:00 UTC


README

HtmlDomParser

Total Downloads License

This package a simple wrapper around Simple Html Dom Parser library.

How to?

Step 1: Install package

Install package by executing the command.

composer require yubarajshrestha/html-dom-parser

Step 2: Implement HtmlDomParser

use YubarajShrestha\HtmlDomParser\Parser;

public function parse_tags()
{
    $html = '<div>
        <ul>
            <li>PHP</li>
            <li>Python</li>
        </ul>
    </div>';

    $parsed = Parser::str_get_html($html);
}

Credit PHP Simple HTML DOM Parser