Cast pasref in XML to a string

Returned an XML object previously, whereas a string would be expected. Casting to a string also brings this method into line with getMessage(). Fixes #4.