M
Marri Suliez
I am trying to run the asp xpath examples from the QuickStarts samples, but
I am not having any luck. When I run the code in a console app it works
fine. When I run the same exact code in an aspx page it doesn't work.
Here's a condensed example of what I am talking about. If I run this code
in a console app the "count" variable will have a value equal to the number
of book nodes in "books.xml". When I run the same code in an aspx page the
count is always 0.
XPathDocument doc = new XPathDocument("books.xml");
XPathNavigator navigator = doc.CreateNavigator();
XPathNodeIterator iterator = navigator.Select("bookstore/book");
int count = iteractor.Count;
Any ideas?
I am not having any luck. When I run the code in a console app it works
fine. When I run the same exact code in an aspx page it doesn't work.
Here's a condensed example of what I am talking about. If I run this code
in a console app the "count" variable will have a value equal to the number
of book nodes in "books.xml". When I run the same code in an aspx page the
count is always 0.
XPathDocument doc = new XPathDocument("books.xml");
XPathNavigator navigator = doc.CreateNavigator();
XPathNodeIterator iterator = navigator.Select("bookstore/book");
int count = iteractor.Count;
Any ideas?