Download the PHP package neochief/html5-dom-document-php without Composer
On this page you can find all versions of the php package neochief/html5-dom-document-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neochief/html5-dom-document-php
More information about neochief/html5-dom-document-php
Files in neochief/html5-dom-document-php
Package html5-dom-document-php
Short Description HTML5 DOMDocument PHP library (extends DOMDocument)
License MIT
Informations about the package html5-dom-document-php
HTML5DOMDocument
HTML5DOMDocument extends the native DOMDocument library. It fixes some bugs and adds some new functionality.
Why use?
- Preserves html entities (DOMDocument does not)
- Preserves void tags (DOMDocument does not)
- Allows inserting HTML code that moves the correct parts to their proper places (head elements are inserted in the head, body elements in the body)
- Allows querying the DOM with CSS selectors (currently available: *, tagname, tagname#id, #id, tagname.classname, .classname, tagname.classname.classname2, .classname.classname2, tagname[attribute-selector], [attribute-selector], "div, p", div p, div > p, div + p and p ~ ul.)
- Adds support for element->classList.
- Adds support for element->innerHTML.
- Adds support for element->outerHTML.
Install via Composer
Documentation
Full documentation is available as part of this repository.
Examples
Use just like you should use DOMDocument:
Query the document with CSS selectors and get the innerHTML and the outerHTML of the elements:
Insert HTML code into a HTML document (other HTML code):
Manipulate the values of the class attribute of an element:
License
This project is licensed under the MIT License. See the license file for more information.
Contributing
Feel free to open new issues and contribute to the project. Let's make it awesome and let's do in a positive way.
Authors
This library is created and maintained by Ivo Petkov (ivopetkov.com) and some awesome folks.
All versions of html5-dom-document-php with dependencies
ext-dom Version *