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.

XMLReader Extension ” 123<br />

• LIBXML_NOERROR<br />

• LIBXML_NONET<br />

• LIBXML_NOWARNING<br />

• LIBXML_NSCLEAN<br />

• LIBXML_XINCLUDE<br />

As an example, a call that configured the parser <strong>to</strong> suppress errors and warnings<br />

might look like this.<br />

<br />

I t e r a t i o n<br />

The XMLReader instance acts as both an itera<strong>to</strong>r o v e r the entire document<br />

as well as a data object for the current node pointed <strong>to</strong> by<br />

that itera<strong>to</strong>r. It contains a set of read-only properties (described at<br />

http://php.net/manual/en/class.xmlreader.php#xmlreader.props) that represent<br />

those of the current node and are updated as the itera<strong>to</strong>r position changes.<br />

<br />

The read() method attempts <strong>to</strong> move the itera<strong>to</strong>r position <strong>to</strong> the next node and returns<br />

a boolean value indicating whether or not it was successful. That is, it returns

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

Saved successfully!

Ooh no, something went wrong!