NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #3388 most downloaded on Packagist
Simple and fast HTML parser
Last release 4 years ago
no release in 18 months
Ships fairly regularly
a new release about every 6 months
Nearly every release is documented
notes for 54 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
61 releases · first in 2015
Fix warning PHP Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecated
PHP Deprecated: mb_convert_encoding(): Handling HTML entities via mbstring is deprecatedHandle nested pseudo-classes with expression correctly
One column per quarter.
Fix parsing of a style property in "style" attribute when the value contains a colon
Add support for extra XML namespaces
Add support for extra XML namespaces
Fix deprecation notice in PHP 8 for libxml_disable_entity_loader
libxml_disable_entity_loaderFix an exception when selecting comment element with XPath
DOMCdataSection nodescreateTextNode(), createComment(), createCdataSection() to the Document classFix bug with unregistered PHP functions in XPath in Document::has() and Document::count() methods
Document::has() and Document::count() methodsFix bug with XML document loading
- Fix issue #85
Use mb_convert_encoding() in the Encoder if it is available
mb_convert_encoding() in the Encoder if it is availableAdd Element::removeChild() and Element::removeChildren() methods
Element::removeChild() and Element::removeChildren() methodsElement::matches() methodElement::matches() method now returns false if node is not DOMElementElement::hasChildren() methodFix bug in setInnerHtml: can't rewrite existing content
InvalidSelectorException instead of InvalidArgumentException when selector is emptyMethod Element::matches() now can check children nodes
ends-with XPathElement::matches() now can check children nodesAdd ability to search in owner document using current node as context
Methods Document::appendChild() and Element::appendChild() now return appended node(s)
Document::appendChild() and Element::appendChild() now return appended node(s)- Bugs fixed
Add Element::getLineNo() method
Element::getLineNo() method- Fix issue #55
- Add support of DOMComment
DOMCommentAdd ability to create an element by selector
Add method Element::isTextNode()
Element::isTextNode()Add ability to check that element matches selector
- Small fix
- Add support of text nodes
- Bug fix
Fixed behavior of nth-child pseudo class
Add pseudo class has and more attribute options
Add methods previousSibling, nextSibling, child, firstChild, lastChild, children, getDocument to the Element
previousSibling, nextSibling, child, firstChild, lastChild, children, getDocument to the Element- Bug fix
Nothing published for this version
Nothing published for this version
Added ability to get an element attribute by CSS selector
Added handling of DOMText and DOMAttr in Document::find()
DOMText and DOMAttr in Document::find()Added ability to get inner HTML
Added the ability to pass options when load HTML or XML
Added the ability to pass an array of nodes to appendChild
Added ability to remove and replace nodes
Nothing published for this version
Nothing published for this version
Nothing published for this version
- Bug fixed
Added the ability to pass element attributes in the constructor
Nothing published for this version
Remove __invoke method from Document , Element and DocumentFragment that was deprecated early
__invoke method from Document, Element and DocumentFragment that was deprecated earlyElement::$tag. Use tagName() method insteadElement::getDocument() to ownerDocument()Node::setInnerXml() method (i. e. for Element and DocumentFragment too)Add ability to direct search by CSS selector
Added the ability to search element by part of attribute name or value
Fixed problem with incorrect encoding
Added the ability to specify the return type element (DiDom\Element or DOMElement)
DiDom\Element or DOMElement)- Bugs fixed
Added the ability to compare Element\Document
Fix a bug when a call of Element::previousSibling() with selector returns a previous sibling when there is not matching element
Element::previousSibling() with selector returns a previous sibling when there is not matching elementAdd support of multiple pseudoclasses
Add Node::insertSiblingBefore() and Node::insertSiblingAfter() methods for inserting sibling nodes
Node::insertSiblingBefore() and Node::insertSiblingAfter() methods for inserting sibling nodesAdd support of document fragments
- Add Element::innerXml() method
Element::innerXml() methodAdd Element::outerHtml() method
Element::outerHtml() methodElement::prependChild() methodElement::insertBefore() and Element::insertAfter() methodsElement::style() method for more convenient inline styles manipulationElement::classes() method for more convenient class manipulation- Many fixes and improvements
Add Element::isElementNode() method
Element::isElementNode() methodElement::attributes() methodElement::removeAllAttributes() methodElement::previousSibling() and Element::nextSibling() methodsElement::previousSiblings() and Element::nextSiblings() methodsThrow InvalidSelectorException instead of RuntimeException in Query class
InvalidSelectorException instead of RuntimeException in Query classConverter from CSS to XPath replaced by faster
Your coding agent can read these notes before it upgrades. Set up the MCP server →