title: How to read from an XmlReader without moving it forwards?
body: <p>I got this scenario:</p>
  
  <pre><code>while (reader.Read())
  {
      if (reader.NodeType == XmlNodeType.Element &amp;&amp; reader.Name == itemElementName)
      {
          XElement item = null;
          try
          {
              item = XElement.ReadFrom(reader) as XElement;
          }
          catch (XmlException ex)
          {
             //log line number and stuff from XmlException class  
          }
      }
  }
  </code></pre>
  
  <p>In the above loop I'm transforming a certain node (itemElementName) into an XElement.</p>
  
  <p>Some nodes will be good XML and will go into an XElement, however, some will not.</p>
  
  <p>In the CATCH, I'd like to not only catch the standard XmlException stuff... I'd also like to catch an extract of the current Xml and a string.</p>
  
  <p>However, if I do any kind of READ operation on the node before I pass it to the XElement, it moves the reader forward.</p>
  
  <p><strong>How can get a "snapshot" of the contents of the OuterXml of the reader without interfering with it's position?</strong></p>