Thanks man that worked!
Anyway I have find a "bug":
If you don't use ".html" in your pages and products urls you have to remove the "html" from the code so the lines are finally like this:
Code:
<loc>'.$http_location.'/'.$pr["clean_url"].'</loc>
Yours!