I have the a full XML file in an XDocument variable which I get from some API like this
using (var reader = XmlReader.Create("website"))
{
doc = XDocument.Load(reader);
}
I need to get the structure of the XML and navigate through its nodes, but through the XDocument variable, I only get the whole document in one node and can not extract each node by itself. So any solution or shall I use another way?