None of that code deals with xml at all. How do you expect us to help?

You will need to call loadImage with the desired URL when you have received it from the xml.