I have an XML file that looks like
<DatabaseInfo>
<DatabaseInformation>
<name>\\server\path\HelpDesk.accdb</name>
</DatabaseInformation>
</DatabaseInfo>
<ShortcutPath>
<ShortcutPathInformation>
<name>Y:\Shortcuts</name>
</ShortcutPathInformation>
</ShortcutPath>
and my C# code looks like
var result = (from ele in XDocument.Load(@"C:\Srptupd\Database.xml").Descendants("DatabaseInformation")
select ele).FirstOrDefault();
if (result != null)
{
//
}
and I get an exception saying
There are multiple root elements. Line 6, position 2.
How can I get the values of name for DatabaseInformation and ShortcutPathInformation?