string s = @" ... XML here ..."; >DataSet ds = new DataSet(); >ds.ReadXml(new StringReader(s));If you intellisense it, you will see that it only shows the parameter as a file name. However, there is an overload in that method. Using it resolves the issue.