php - Simple HTML DOM Parser for microdata -
i using simple html dom parser scrape data , ran question: how gather data contained in htlm5 microdata.
for example, <meta itemprop="title" content="charlie , chocolate factory">
how both itemprop content meta properties using simple html dom parser?
is question how iterate elements itemprop attribute? if so:
foreach($doc->find('[itemprop]') $el){ echo $el->itemprop . "\n"; echo $el->content . "\n"; }
Comments
Post a Comment