title: XmlTextReader - How to iterate through nodes
body: <p>I need help with cycling through nodes of a XML document using XmlTextReader. Using anything else besides XmlTextReader is not an option, unfortunately.</p>
  
  <p>My code:
  <code><pre>
      class Program
      {
      private static void Main(string[] args)
      {
      XmlTextReader reader = new XmlTextReader("http://api.own3d.tv/liveCheck.php?live_id=180491");
              while (reader.Read())
              {
                  switch (reader.NodeType)
                  {
                      case XmlNodeType.Text:
                          Console.WriteLine("Live: " + reader.Value);
                          break;
                  }
              }
              Console.ReadLine();
          }
      }</p>
  
  <p></code></pre></p>
  
  <p>XML used:</p>
  
  <pre><code>&lt;own3dReply&gt;
   &lt;liveEvent&gt;
    &lt;isLive&gt;true&lt;/isLive&gt;
    &lt;liveViewers&gt;225&lt;/liveViewers&gt;
    &lt;liveDuration&gt;1222&lt;/liveDuration&gt;
   &lt;/liveEvent&gt;
  &lt;/own3dReply&gt;
  </code></pre>
  
  <p>What it's outputting to console:</p>
  
  <pre>
  
      Live: true
      Live: 225
      Live: 1222
  
  </pre>
  
  <p>What it needs to output:</p>
  
  <pre>
  
      Live: true
      Viewers: 225
      Duration: 1222
  
  </pre>
  
  <p>It needs to iterate through each node and do this, and I just can't figure it out. I tried using switch and while statements, but I just can't seem to get it to work.</p>