The function that has the problematic xml (psx.getXMPValue) can be removed as it is not used. The version I am using is a earlier one that did not have some of the psx functions.
I have applied the patch to the 2.3.1 code and it has tested succesfully.
I'll email you the modified rev.