03.02.2014 Views

php|architect's Guide to Web Scraping with PHP - Wind Business ...

php|architect's Guide to Web Scraping with PHP - Wind Business ...

php|architect's Guide to Web Scraping with PHP - Wind Business ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

108 ” DOM Extension<br />

• //@id addresses all id attribute nodes that are descendants of the context node<br />

regardless of the element <strong>with</strong> which they are associated.<br />

U n i o n s<br />

When addressing nodes, it is possible <strong>to</strong> perform a single query that uses multiple<br />

expressions. This is referred <strong>to</strong> as addressing the union of those expressions.<br />

<br />

• The first example returns all list items (li) of both unordered (ul) and ordered<br />

(ol)) lists.<br />

• The second example returns all header (th) and data (td) cells of table rows<br />

(tr).<br />

Conditions<br />

In addition <strong>to</strong> their surrounding hierarchical structure, nodes can also be addressed<br />

based on conditions.<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!