title: C# how can I get all elements name from a xml file
body: <p>I'd like to get all the element name from a xml file, for example the xml file is,</p>
  
  <pre><code>&lt;BookStore&gt;
    &lt;BookStoreInfo&gt;
      &lt;Address /&gt;
      &lt;Tel /&gt;
      &lt;Fax /&gt;
    &lt;BookStoreInfo&gt;
    &lt;Book&gt;
      &lt;BookName /&gt;
      &lt;ISBN /&gt;
      &lt;PublishDate /&gt;
    &lt;/Book&gt;
    &lt;Book&gt;
     ....
    &lt;/Book&gt;
  &lt;/BookStore&gt;
  </code></pre>
  
  <p>I would like to get the element's name of "BookName". "ISBN" and "PublishDate "  and only those names, not include " BookStoreInfo" and its child node's name</p>
  
  <p>I tried several ways, but doesn't work, how can I do it?</p>