QueryPath pear.querypath.org QueryPath: A library for working with XML, HTML, and web services. QueryPath implements much of the jQuery API in PHP, and supports CSS selector queries, jQuery's traversal and manipulation APIs, and adds many other useful methods. Learn more at http://querypath.org. Matt Butcher technosophos matt@aleph-null.tv yes Emily Brand eabrand emily@example.com yes Woody Gilk shadowhand woody@wingsc.com yes 2010-10-21 2.1.0dev2 2.1.0dev2 devel devel LGPL or MIT (Your Choice) RELEASE NOTES Big Changes: 1. There is now an `htmlqp()` function that parses crufty HTML in a far more reliable way than `qp()`. Use this instead of any variant of the older `@qp()` setup. 2. The API has been brought into alignment with jQuery 1.4. See API-2.1.0 for details. 3. This release was driven substantially by eabrand's GSOC 2010 contributions. Thanks, Emily! 4. There are now Phar and PEAR packages available. Got to http://pear.querypath.org for PEAR packages. 5. The minimal QP distribution is no longer minified, as it reportedly causes XDebug to crash. 7. Data URs are now supported. QueryPath can now embed images directly into HTML and XML this way. 8. Documentation is now in Doxygen instead of PhpDocumentor. Thanks to Matt Farina and Kevin O'Brien for their input. Changes in 2.1 All changes are documented in their respective doc blocks. So take a look at http://api.querypath.org to learn more. New Functions * The `htmlqp()` method has been added for parsing icky HTML. Use this for web scraping. Altered Functions * The qp() function now supports the following new options: - convert_to_encoding - convert_from_encoding - strip_low_ascii - use_parser New Methods * attach()/detach() * has() * emptyElement() * even()/odd() * first()/last() * firstChild()/lastChild() * nextUntil()/prevUntil() * parentsUntil() * encodeDataURL() * dataURL() * filterPreg() Altered Methods * css() has been changed to allow subsequent calls to modify the style attribute (issue #28) * attr() has been changed. If it is called with no arguments, it now returns all attributes. New CSS Selectors Behavior * :contains-exactly() performs as :contains() used to perform. Altered CSS Selectors Behavior * The star operator (*) is now non-greedy, per spec. Before, the star would match any descendants. Now it will only match children. * :contains() now does substring matching instead of exact matching. This conforms to jQuery's behavior. * Quotes are now checked carefully before being stripped from pseudo-class values. * Issue #40 identified a potential infinite looping problem on poorly formed selectors. This was fixed. 5.2.0 2.0.0a1