The
XmlDocument
doesn't know about ASP.NET's app-relative URLs. You need to pass the full physical path to the
Load
method.
You also need to specify the path to your XML file, not the path to your
Default.aspx
file.
You also need to provide the correct XPath expression to the
Select
method.
string physicalPath = Server.MapPath("~/xml/xml1.xml");
doc1.Load(physicalPath);
XmlElement root = doc1.DocumentElement;
XmlNodeList nodes = root.SelectNodes("/sorts/sort");