I have some markup which I need to crawl for images, and check if the images exists in the paths they have specified. If an image does not exists in location A, the path should be replaced with location B.
I’m wondering what would be the most efficient way of achieving this?
Use PHP’s SimpleXML. It is quite easy to use. Here’s an example (which probably won’t work, but you get the idea):