0

How do I create the path to the attribute that has been found?

lets say that I loop through an HTML file using DOMXPath, looking for all IMG tags. If one is found, how do I extract the path to that IMG tag?

I want to find ALL IMG tags, and have a user select one image. I need to store the path to that specific IMG.

Thanks

user1973842
  • 93
  • 1
  • 8
  • You can use `DOMNode::getNodePath()`. The answer to **[this](http://stackoverflow.com/questions/14014862/xpath-finding-absolute-path-is-there-any-easy-way)** question shows how to use it. – helderdarocha May 11 '14 at 01:05
  • great, exactly what i was looking for. thanks :) – user1973842 May 11 '14 at 06:17

0 Answers0