I need a function in PHP that parses a webpage with XML and arrange the output in nodes with Xpath. I want to call the functions with a couple of paramaters and I want the output to be structured with nodes. So I easily can use Xpath code to extract additional data from the Webpage.
2) Xpath expr (default:None) - An expression can look like this //head/meta
3) Force encoding/charset (Default: Use the charset from Starturl meta)
4) Accept gzip-encoded response (Default: Yes) - The class need to handle these encoded reponds
5) User-Agent - Be able to change the user agent
The output should be structured in Xpath nodes (See attached image), for each time I call the function with an Xpath expression (2) I get further down the structured XML three. Finally I can for example extract an image link or a text field.
If you have more questions ask me in PM.