Can't get InnerText of a node in an XML document

  • Thread starter Thread starter Zetar
  • Start date Start date
Z

Zetar

Guest
This is a really simple problem and I'm having trouble solving it.

I have an XML document. It's structure is like this:

<Scenario>

<ScenarioDescription>

<Other stuff... >

I need to get the InnerText of the ScenarioDescription. It only appears once in the XML file. There is only one node called <ScenarioDescription>

Here's my C# code:

xml.Load(s);
XmlNode root = xml.DocumentElement;
XmlNode test = root.SelectSingleNode("//Scenario/*");
ScenarioText = test.InnerText;

test is returning NULL,

Help!

Continue reading...
 

Similar threads

N
Replies
0
Views
140
NachoShaw
N
P
Replies
0
Views
118
Policy standard local admin account with Active Di
P
Back
Top