I've got an XmlNode
object rowNode
, and when I call rowNode.OuterXml
I get this result:
<Row Nr="1">
<Område FormulaR1C1="" />
<Position FormulaR1C1="" />
<Lev FormulaR1C1="" />
<Option FormulaR1C1="" />
</Row>
I'm trying to get the value of Område
with the following code:
rowNode.SelectSingleNode("/Row/Område").InnerText
and I get Referenced object has a value of 'Nothing'.
That's okay, I guess, because it has no value. But then I do it with another turn of the rowNode
object where the XML is:
<Row Nr="2">
<Område FormulaR1C1="1">1</Område>
<Position FormulaR1C1="1">1</Position>
<Lev FormulaR1C1="NM">NM</Lev>
<Option FormulaR1C1="" />
</Row>
And I still get Referenced object has a value of 'Nothing'.
I also tried with some of the other elements - Lev
and Position
but I get the same "Nothing" result. What am I doing wrong?