How to reference a XML element nested within an unknown amount of other elements : I want to reference an XML element that is nested within an unknown amount of other elements. <br>
For example if I have an XML file like this:
      
    <root>
        <Example>
        </Example>
    </root>
And I want to add an element within the `<Example>` element. When I add an element within the root element I can do it like this (assuming `Doc` is an already defined XDocument)

    Doc.Element("root").Add(new XElement("Example"));
And if there is two I can do

    Doc.Element("root").Element("Example").Add(new XElement("newExample"))
This works fine if I know exactly what elements are going to be within what, because I can hardcode it. This does not work, however, when I don't know what elements are going to be in what.<br><br>

My project is a virtual folder system (makes more sense if you read [this][1]), so I don't know what elements will be nested within what. I have thought of saving the directory within the program in a `List<string>`, which works to store the directory, but because the only way I know how to reference elements is with hardcoding every single element. Is there any way I can reference any element nested within any other element without having to hardcode every parent element?


  [1]: https://github.com/CobaltsDev/Virtual-Folder-System/wiki