![]() |
|
|
#1 |
|
Guest
Posts: n/a
|
Re: XPath and XmlNodeList, the horror, the horror!
On Dec 14, 11:43 am, DotNetNewbie <snowman908...@yahoo.com> wrote:
> On Dec 13, 6:12 pm, Jon Skeet [C# MVP] <sk...@pobox.com> wrote: > > > > > DotNetNewbie <snowman908...@yahoo.com> wrote: > > > <snip> > > > > Again the error on the webpage is: > > > > Exception Details: System.Xml.XPath.XPathException: Expression must > > > evaluate to a node-set. > > > Source Error: > > > foreach (XmlElement page in nodeList) > > > Has it definitely load the file correctly? What does it look like in > > the debugger? > > > -- > > Jon Skeet - <sk...@pobox.com>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet > > World class .NET training in the UK:http://iterativetraining.co.uk > > yes the file is loaded correctly, I put debug tag when it loads the > file, and during the loop. > > After it loads the file and hits the forloop, in vs.net I can view > that the cars.xml file has loaded just fine. Ok got it to work, I was referencing the child nodes incorrectly! thanks for all your replies! |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|