To have double-quote embedded in an attribute value in XML you need to use ". So in your test case, you would use: <class name="Role" table=""role""> http://stackoverflow.com/questions/650821/how-do-i-escape-double-quotes-in-attributes-in-an-xml-string-in-t-sql |