If it is a string in your query, something like
declare @xmltext varchar(200);
set @xmltext = '<Cust_Name>John P O'Connell</Cust_Name>'
The error is that you have to escape the quote in the string:
set @xmltext = '<Cust_Name>John P O''Connell</Cust_Name>'
Russel Loski, MCT