I guess the input xmlfile is broken somehow. Look into the file around line 45 for chars that are not part of your encoding. Delete the chars, or translate them. And retry.
D'oh, I've been trying to solve this for about an hour, and that never occurred to me. Thanks for the suggestions, you are both correct! everything working fine now...