multipart functions now catch Curl exceptions correctly
fixed XML parsing
added xml parsing test