title: how to traverse parent node till root element in xml in c#
body: <p>I am trying to access parent node hierarchy till root element from child element in C# and want to store it in string.</p>
  
  <p>In the below xml, I would like to access parent nodes of the <code>&lt;watchVideo&gt;</code> element but I don't want to include the root tag in my string and the output should be like this:</p>
  
  <pre><code>herobanner.landing.copies.watchvideo
  </code></pre>
  
  <p>My xml format is:</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;root&gt;  
    &lt;country&gt;en-in&lt;/country&gt;
    &lt;heroBanner&gt;
      &lt;landing&gt;
        &lt;copies&gt;
          &lt;watchVideo&gt;watch the video&lt;/watchVideo&gt;
          &lt;scrollDown&gt;READ INSPIRING STORIES&lt;/scrollDown&gt;
          &lt;scrollDown/&gt;
          &lt;banner&gt;make your&lt;/banner&gt;
          &lt;banner&gt;first move this&lt;/banner&gt;
          &lt;banner&gt;valentine's Day&lt;/banner&gt;
        &lt;/copies&gt;
        &lt;background&gt;
          &lt;desktop&gt;assets/images/millions-hero-1.jpg&lt;/desktop&gt;
        &lt;/background&gt;
        &lt;foreground&gt;
          &lt;desktop/&gt;
        &lt;/foreground&gt;
        &lt;video&gt;
          &lt;youtubeId&gt;buwcDIcFR8I&lt;/youtubeId&gt;
        &lt;/video&gt;
      &lt;/landing&gt;
    &lt;/heroBanner&gt;
  &lt;/root&gt;
  </code></pre>