Re: XPath and XmlNodeList, the horror, the horror!

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



On Dec 12, 6:17 pm, Jon Skeet [C# MVP] <sk...@xxxxxxxxx> wrote:
DotNetNewbie <snowman908...@xxxxxxxxx> wrote:

<snip>

but if I try and loop through them I get an error: Expression must
evaluate to a node-set.

When? At compile-time, or execution time?

Where? Which line of code?

Could you post a short but complete program which demonstrates the
problem?

Seehttp://www.pobox.com/~skeet/csharp/complete.htmlfor details of
what I mean by that.

--
Jon Skeet - <sk...@xxxxxxxxx>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet
World class .NET training in the UK:http://iterativetraining.co.uk

This line reports the error:

for (int x = 0; x < nodeList[0].ChildNodes.Count; x++)


I'll post the working code next....
.



Relevant Pages