> How do I read the entire XML text from an XMLReader ?
> I just want to retrieve the XML string from a SQL SP formatted as XML.
> I assumed the ExecuteXMLReader was the best option. So whats the most
> streamlined process of getting the XML into a string ?
If you don't care about comments and PIs outside root element, all you
need is to move reader to content and read outer XML:
r.MoveToContent();
Console.WriteLine(r.ReadOuterXml());
if you do care about that stuff at roto level, then you can use
something lik ethis:
StringWriter sw = new StringWriter();
XmlTextWriter w = new XmlTextWriter(sw);
while (r.Read())
w.WriteNode(r, false);
w.Close();
r.Close();
Console.WriteLine(sw.ToString());

Signature
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog