http://sizzlejs.com/ port for PHP's DOMDocument.