XML: Object reference not set to an instance of an object
问题 <?xml version="1.0" encoding="utf-8" ?> <siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/" title="Úvodní stránka"> <siteMapNode url="Pocitace" title="Počítače" /> <siteMapNode url="Elektronika" title="Elektronika" /> </siteMapNode> </siteMap> And I write to this file new data: XmlDocument originalXml = new XmlDocument(); originalXml.Load(Server.MapPath("../../Web.sitemap")); XmlAttribute title = originalXml.CreateAttribute("title"); title.Value =