Fixed 'purge_records' method

The method was generating a string instead of a XML.