ka业务经理是什么意思:asp.net中xml错误

来源:百度文库 编辑:高校问答 时间:2024/05/03 04:04:15
XPathDocument document =new XPathDocument("books.xml");////显示这里错,怎么回事???
XPathNavigator navigator = document.CreateNavigator();

XPathNodeIterator nodes = navigator.Select("/bookstore/book");/////////

XPathNavigator nodesNavigator = nodes.Current;

XPathNodeIterator nodesText = nodesNavigator.SelectDescendants(XPathNodeType.Text, false);

while (nodesText.MoveNext ())
{
System.Console.Write(nodesText.Current.Name );
System.Console.WriteLine(nodesText.Current.Value);
}

/////////////
未处理的“System.Xml.XmlException”类型的异常出现在 system.xml.dll 中。

其他信息: 系统错误。

你当前路径下有没有这个XML文件?