Are you sure you want to xml_escape() before finding the URL?