<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>XML and XmlDataSource Control</title><link>http://forums.asp.net/43.aspx</link><description>All about XML, XSLT, and the XmlDataSource control.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2361156.aspx</link><pubDate>Fri, 16 May 2008 00:40:03 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2361156</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2361156.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2361156</wfw:commentRss><description>&lt;p&gt;Is it possible to return multiple result sets using the FOR XML to fill an xml file in my app?&amp;nbsp;It works fine when returning only one result set.&lt;br /&gt;I&amp;#39;ve tried:&lt;br /&gt;&lt;span class="kwd"&gt;&lt;font color="#0000ff"&gt;&lt;span class="kwd"&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#000000"&gt; obj = com.&lt;font size="2"&gt;ExecuteNonQuery&lt;/font&gt;();&lt;br /&gt;&lt;/font&gt;&lt;/span&gt;&lt;span class="kwd"&gt;&lt;font color="#000000"&gt;&lt;span class="kwd"&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt; obj = com.&lt;font size="2"&gt;ExecuteReader&lt;/font&gt;();&lt;br /&gt;&lt;span class="kwd"&gt;&lt;font color="#0000ff"&gt;&lt;span class="kwd"&gt;&lt;font color="#0000ff"&gt;object&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;font color="#000000"&gt; obj = com.&lt;font size="2"&gt;ExecuteXmlReader&lt;/font&gt;();&lt;/font&gt;&lt;/span&gt;&lt;/font&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2358952.aspx</link><pubDate>Thu, 15 May 2008 05:56:31 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2358952</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2358952.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2358952</wfw:commentRss><description>&lt;p&gt;That&amp;#39;s it, thank you!!!! &lt;img src="http://forums.asp.net/emoticons/emotion-2.gif" alt="Big Smile" /&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2356549.aspx</link><pubDate>Wed, 14 May 2008 08:38:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2356549</guid><dc:creator>Samu Zhang - MSFT</dc:creator><author>Samu Zhang - MSFT</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2356549.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2356549</wfw:commentRss><description>&lt;p&gt;Hi &lt;strong&gt;MJ20&lt;/strong&gt; ,&lt;/p&gt;
&lt;p&gt;Just a remind.&lt;/p&gt;
&lt;p&gt;&lt;BLOCKQUOTE&gt;&lt;div&gt;&lt;img src="/Themes/fan/images/icon-quote.gif"&gt; &lt;strong&gt;MJ20:&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;/p&gt;
&lt;p&gt;XmlTextWriter writer = new XmlTextWriter(&amp;quot;NamesXml.xml&amp;quot;, null);&lt;br /&gt;writer.Formatting = Formatting.Indented;&lt;br /&gt;doc.Save(writer);&lt;/p&gt;
&lt;p&gt;&lt;/div&gt;&lt;/BLOCKQUOTE&gt;&lt;/p&gt;
&lt;p&gt;Please flush the writer . Try to invoke it&amp;#39;s Flush method or Close method.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2353758.aspx</link><pubDate>Tue, 13 May 2008 07:20:58 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2353758</guid><dc:creator>Samu Zhang - MSFT</dc:creator><author>Samu Zhang - MSFT</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2353758.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2353758</wfw:commentRss><description>&lt;p&gt;Hi &lt;strong&gt;MJ20&lt;/strong&gt; ,&lt;/p&gt;
&lt;p&gt;Try my sample,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;            SqlConnection con = &lt;span class="kwd"&gt;new&lt;/span&gt; SqlConnection(@&lt;span class="st"&gt;&amp;quot;Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security=True;User Instance=True&amp;quot;&lt;/span&gt;);
            SqlCommand com = &lt;span class="kwd"&gt;new&lt;/span&gt; SqlCommand(&lt;span class="st"&gt;&amp;quot;sqlxmltest&amp;quot;&lt;/span&gt;,con);
            com.CommandType = CommandType.StoredProcedure;
            con.Open();
            &lt;span class="kwd"&gt;object&lt;/span&gt; obj = com.ExecuteScalar();
            con.Close();

            XmlDocument doc = &lt;span class="kwd"&gt;new&lt;/span&gt; XmlDocument();
            doc.LoadXml(obj.ToString ());
            doc.Save(Server.MapPath(&lt;span class="st"&gt;&amp;quot;sqlxmltest.xml&amp;quot;&lt;/span&gt;));&lt;/pre&gt;&amp;nbsp;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;span class="sqlkwd"&gt;ALTER PROCEDURE&lt;/span&gt; dbo.sqlxmltest

&lt;span class="sqlkwd"&gt;AS
	SELECT&lt;/span&gt; id, &lt;span class="sqlkwd"&gt;name
FROM&lt;/span&gt; country &lt;span class="sqlkwd"&gt;FOR XML&lt;/span&gt; path(&lt;span class="st"&gt;&amp;#39;custname&amp;#39;&lt;/span&gt;), root(&lt;span class="st"&gt;&amp;#39;root&amp;#39;&lt;/span&gt;)&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2350901.aspx</link><pubDate>Sun, 11 May 2008 21:28:29 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2350901</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2350901.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2350901</wfw:commentRss><description>&lt;p&gt;Here&amp;#39;s the GetXml method:&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;public DataSet GetXml()&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DataSet ds = new DataSet();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlConnection con = new SqlConnection(strConn);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; con.Open();&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlCommand sc = new SqlCommand();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc.Connection = con;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc.CommandType = CommandType.Text;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sc.CommandText = &amp;quot;dbo.GetCustNames&amp;quot;;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SqlDataAdapter myReader = new SqlDataAdapter(sc);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; myReader.Fill(ds);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ds.WriteXml(HttpContext.Current.Server.MapPath(&amp;quot;NamesXml.xml&amp;quot;));&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; con.Close();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; con = null;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return ds;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;myDAL = new DALClass();&lt;br /&gt;string NamesDs = myDAL.GetXml(); //returns xml resultset&lt;br /&gt;NamesDs = &amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; standalone=\&amp;quot;yes\&amp;quot;?&amp;gt;&amp;quot; + NamesDs;&lt;br /&gt;NamesDs = NamesDs.Replace(&amp;quot;\\&amp;quot;, string.Empty);&lt;br /&gt;XmlDocument doc = new XmlDocument();&lt;br /&gt;doc.LoadXml(NamesDs);&lt;br /&gt;XmlTextWriter writer = new XmlTextWriter(&amp;quot;NamesXml.xml&amp;quot;, null);&lt;br /&gt;writer.Formatting = Formatting.Indented;&lt;br /&gt;doc.Save(writer);&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2350155.aspx</link><pubDate>Sun, 11 May 2008 01:14:47 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2350155</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2350155.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2350155</wfw:commentRss><description>&lt;p&gt;I set a break point on the following line: doc.Save(writer);&lt;font size="2"&gt;&lt;br /&gt;and I&amp;#39;m getting the following value for NamesDs: &lt;font face="Times New Roman" size="3"&gt;&amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; standalone=\&amp;quot;yes\&amp;quot;?&amp;gt;&amp;lt;db&amp;gt;&amp;lt;dbname name=\&amp;quot;ReportServer\&amp;quot;/&amp;gt;&amp;lt;dbname name=\&amp;quot;ReportServerTempDB\&amp;quot;/&amp;gt;&amp;lt;dbname name=\&amp;quot;Reporting\&amp;quot;/&amp;gt;&amp;lt;/db&amp;gt;&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;font face="Times New Roman" size="3"&gt;&lt;br /&gt;I&amp;#39;m not getting the&amp;nbsp;escape keys&amp;nbsp;when I run the sproc in SQL Server.&lt;br /&gt;&lt;font color="#0000ff" size="2"&gt;SELECT&lt;/font&gt;&lt;font size="2"&gt; custname &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;as&lt;/font&gt;&lt;font size="2"&gt; &amp;quot;@name&amp;quot;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;FROM&lt;/font&gt;&lt;font size="2"&gt; CustomerNames&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;FOR&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;XML&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;PATH&lt;/font&gt;&lt;font color="#808080" size="2"&gt;(&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&amp;#39;custname&amp;#39;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;),&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ROOT&lt;/font&gt;&lt;font color="#808080" size="2"&gt;(&lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&amp;#39;cust&amp;#39;&lt;/font&gt;&lt;font color="#808080" size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;br /&gt;&lt;/font&gt;I&amp;#39;m not getting an error anymore. But it&amp;#39;s not writing into my xml file. I&amp;#39;ve tried the following 3 options with my xml file but it doesn&amp;#39;t ever get written into when running the app. I&amp;#39;m sorry. I&amp;#39;m new to xml.&lt;br /&gt;&lt;br /&gt;option 1: (blank)&lt;br /&gt;option 2: &lt;br /&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;?&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;xml&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;version&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;1.0&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;standalone&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;yes&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;?&amp;gt;&lt;br /&gt;&lt;font color="#000000"&gt;option 3:&lt;/font&gt;&lt;br /&gt;&amp;lt;?&lt;font color="#a31515" size="2"&gt;xml&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;version&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;1.0&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;standalone&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;yes&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;?&amp;gt;&lt;br /&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;cust&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;br /&gt;&amp;lt;&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;custname&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;name&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font color="#000000" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; /&amp;gt;&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;lt;/&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;cust&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2349959.aspx</link><pubDate>Sat, 10 May 2008 18:32:07 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2349959</guid><dc:creator>jamesqua</dc:creator><author>jamesqua</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2349959.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2349959</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You don&amp;#39;t need to use the replace method.&amp;nbsp; the backslashes are just escape characters.&amp;nbsp; The \&amp;quot; signifies that you want a quote within your string, otherwise the compiler would think the quote means the string has ended.&amp;nbsp; Are you certain that &lt;/p&gt;&lt;p&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt;&lt;font size="1"&gt;&lt;font color="#000000" size="3"&gt;&amp;quot;&amp;lt;?xml
version=\&amp;quot;1.0\&amp;quot; standalone=\&amp;quot;yes\&amp;quot;?&amp;gt;&amp;lt;db&amp;gt;&amp;lt;dbname
name=\&amp;quot;ReportServer\&amp;quot;/&amp;gt;&amp;lt;dbname
name=\&amp;quot;ReportServerTempDB\&amp;quot;/&amp;gt;&amp;lt;dbname
name=\&amp;quot;Reporting\&amp;quot;/&amp;gt;&amp;lt;/db&amp;gt;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;p&gt;is the value of NamesDs?&amp;nbsp; Because it compiles and runs just fine when I tried it.&amp;nbsp; On what line is the error occurring?&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2348800.aspx</link><pubDate>Fri, 09 May 2008 17:55:15 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2348800</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2348800.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2348800</wfw:commentRss><description>&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font size="2"&gt;
&lt;p&gt;The value of NamesDS is: &lt;br /&gt;&lt;font size="1"&gt;&lt;font color="#000000" size="3"&gt;&amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; standalone=\&amp;quot;yes\&amp;quot;?&amp;gt;&amp;lt;db&amp;gt;&amp;lt;dbname name=\&amp;quot;ReportServer\&amp;quot;/&amp;gt;&amp;lt;dbname name=\&amp;quot;ReportServerTempDB\&amp;quot;/&amp;gt;&amp;lt;dbname name=\&amp;quot;Reporting\&amp;quot;/&amp;gt;&amp;lt;/db&amp;gt;&amp;quot;&lt;br /&gt;&lt;font color="#0000ff" size="2"&gt;even when I use the .Replace method below to try to remove the \&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;br /&gt;I&amp;#39;m getting&amp;nbsp;the error &lt;b style="mso-bidi-font-weight:normal;"&gt;&lt;i&gt;&lt;span style="COLOR:red;"&gt;&lt;font size="3"&gt;Root element is missing. &lt;/font&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;myDAL = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;DALClass&lt;/font&gt;&lt;font size="2"&gt;();&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt; NamesDs = myDAL.GetXml(); &lt;/font&gt;&lt;font color="#008000" size="2"&gt;//returns xml resultset&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;NamesDs = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;lt;?xml version=\&amp;quot;1.0\&amp;quot; standalone=\&amp;quot;yes\&amp;quot;?&amp;gt;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt; + NamesDs;&lt;br /&gt;NamesDs = NamesDs.Replace(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;\\&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;font size="2"&gt;.Empty);&lt;br /&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;XmlDocument&lt;/font&gt;&lt;font size="2"&gt; doc = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;XmlDocument&lt;/font&gt;&lt;font size="2"&gt;();&lt;br /&gt;doc.LoadXml(NamesDs);&lt;br /&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;XmlTextWriter&lt;/font&gt;&lt;font size="2"&gt; writer = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;XmlTextWriter&lt;/font&gt;&lt;font size="2"&gt;(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;NamesXml.xml&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;);&lt;br /&gt;writer.Formatting = &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;Formatting&lt;/font&gt;&lt;font size="2"&gt;.Indented;&lt;br /&gt;doc.Save(writer);&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="3"&gt;&lt;font face="Times New Roman"&gt;&lt;font size="2"&gt;&lt;font size="2"&gt;&lt;img src="http://forums.asp.net/emoticons/emotion-7.gif" alt="Tongue Tied" /&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2347240.aspx</link><pubDate>Fri, 09 May 2008 05:19:39 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2347240</guid><dc:creator>jamesqua</dc:creator><author>jamesqua</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2347240.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2347240</wfw:commentRss><description>&lt;p&gt;Do you mean how do you put that at the beginning of the xml document?&amp;nbsp; A very simple way would be just to concatenate it before you pass the string to the LoadXml method.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2347053.aspx</link><pubDate>Fri, 09 May 2008 02:23:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2347053</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2347053.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2347053</wfw:commentRss><description>&lt;p&gt;How do you include the following in the query?&lt;/p&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;&amp;lt;?&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;xml&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;version&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;1.0&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt; &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;standalone&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;=&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;yes&lt;/font&gt;&lt;font size="2"&gt;&amp;quot;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;?&amp;gt;&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2347018.aspx</link><pubDate>Fri, 09 May 2008 01:30:27 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2347018</guid><dc:creator>jamesqua</dc:creator><author>jamesqua</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2347018.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2347018</wfw:commentRss><description>&lt;p&gt;For xml auto returns the entire record as one big string.&amp;nbsp; You just need to use the LoadXml property of the XmlDocument class and pass the string as an argument like&lt;/p&gt;
&lt;p&gt;objXmlDocument.LoadXml(databaseScalarResult);&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2346998.aspx</link><pubDate>Fri, 09 May 2008 00:58:50 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346998</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346998.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2346998</wfw:commentRss><description>&lt;p&gt;Thank you! That&amp;#39;s really cool. The only thing is... how do I use it to populate my xml file in my application?&lt;/p&gt;</description></item><item><title>Re: Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2346874.aspx</link><pubDate>Thu, 08 May 2008 21:54:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346874</guid><dc:creator>jamesqua</dc:creator><author>jamesqua</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346874.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2346874</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Do you mean how do you call a stored procedure and receive xml? &lt;/p&gt;&lt;p&gt;You can use the &amp;quot;for xml auto&amp;quot; clause&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;br /&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/ms345137.aspx"&gt;http://msdn.microsoft.com/en-us/library/ms345137.aspx&lt;/a&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Load XML  file From Sproc</title><link>http://forums.asp.net/thread/2346798.aspx</link><pubDate>Thu, 08 May 2008 21:02:12 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2346798</guid><dc:creator>MJ20</dc:creator><author>MJ20</author><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2346798.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=43&amp;PostID=2346798</wfw:commentRss><description>&lt;p&gt;Hi. I know how to load a GridView from an xml file that already has data in it. How do you load data from a stored procedure into the xml file?&lt;br /&gt;&lt;br /&gt;Thanks &lt;img src="http://forums.asp.net/emoticons/emotion-7.gif" alt="Tongue Tied" /&gt;&lt;/p&gt;</description></item></channel></rss>