Stoolz

Stoolz

  • NA
  • 7
  • 0

Using XPathNavigator to retrieve a node by name, using wildcards!

Oct 16 2007 4:06 AM

Hi,

I've been trying to retrieve some nodes by node name, using wildcards, but have failed miserably! So, I wondered if anyone had done this before and could give me some pointers? Here's a description of what I'm trying to acheive:

Assume I have some xml that looks like this:

<settings>
 <name1>Value 1...</name1>
 <name2>Value 2...</name2>
 <name3>Value 3...</name3>
 <something1>Value 1...</something1>
 <something2>Value 2...</something2>
<settings>

I need to use C# to retrieve all the node values where the node name begins with "name" (i.e. name1, name2 and name3)

Thanks in advance!!


Answers (4)