title: How to get name of System.Xml.Linq.XNode?
body: <p>Each XML element, like <code>&lt;title /&gt;</code> has a name - "title".
  I use foreach to enumerate items supplied by <strong>XNode.Nodes()</strong> method and handle each of them by tag name.</p>
  
  <p>I cast XNode to XElement, to access <strong>XElement.Name.LocalName</strong> property to get tag name, like "title".</p>
  
  <pre><code>foreach(XElement as_element in doc.Nodes())
  </code></pre>
  
  <p>Problem has appeared after i have tried parsing this tag:</p>
  
  <pre><code>&lt;title&gt;"Some text"&lt;/title&gt;
  </code></pre>
  
  <p>Now its type is XText (: XNode), and i cannot cast it to XElement. I get an InvalidCastException.
  How can i get XNode's "name"?</p>