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?