Try to change the path where you're saving the file.
I had the same problem once, it was authorization. I couldn't save in C:\ root.
Change filename = 'C:\rh.xml' to filename = 'C:\TEMP\rh.xml'.
Or try any other path, but C:\
Try to change the path where you're saving the file.
I had the same problem once, it was authorization. I couldn't save in C:\ root.
Change filename = 'C:\rh.xml' to filename = 'C:\TEMP\rh.xml'.
Or try any other path, but C:\