title: How to read a xml string into XMLTextReader type
body: <p>I have an XML string. I need to convert this string into <strong>XMLTextReader</strong>(System.Xml.XMLTextReader) type in dotnet. </p>
  
  <p>I used the following code: </p>
  
  <pre><code>string szInputXml = "&lt;TestDataXml&gt;&lt;DataName&gt;testing&lt;/DataName&gt;&lt;/TestDataXml&gt;" ;
  XmlTextReader reader = new XmlTextReader(new System.IO.StringReader(szInputXml));
  </code></pre>
  
  <p>But the string inside the <strong>reader</strong> is empty after execution. </p>
  
  <p>Please help me to figure out what needs to be done to get the XMLTextReader to be populated with the given string.</p>