Skip to content
Advertisement

Tag: scraper

how to get multiple data from xpath query?

This is HTML page (test.html) The PHP Code here NOTE: i want to get result like this Answer One approach is to use the contextnode parameter to DOMXPath::query to do a subquery on each of the mainid elements for the child subids. Something like this: Note that the trim calls are necessary or you will end up with all of

Advertisement