I’m thinking the time might have come to write a wrapper around DOMDocument which actually makes it usable. Thoughts:

  • automatic conversion of various encodings to HTML entities to scoot round encoding issues
  • XPath queries still work but querySelector and querySelectorAll are implemented for both the document and individual elements via Symfony XPath → CSS converter and relative XPath queries
  • A DOMNodeList which actually implements ArrayAccess instead of acting like a fake array
  • Perhaps some javascript-inspired property names like innerText, innerHTML for consistency
  • Maybe some jQuery-influenced shortcut goodness for doing things like removing/replacing elements