fixed some path issues, manipulate xml before sending it to browser