Riyal MHH
Riyal MHH

Reputation: 1

C# Xpath Error content:encoded

How can I read a xml element, something like:

<content:encoded><![CDATA[<blockquote><p>some data here ]]<content:encoded>

I want to read the above xml node in C#, but when I use...

"content:encoded" 

.. as the xpath runtime error come:

  IXmlNode node = parent.SelectSingleNode("content:encoded");

How should I write the xpath for above xml?

Upvotes: 0

Views: 875

Answers (1)

Cylian
Cylian

Reputation: 11182

Add a namespace declaration on the top of the module/class.

Upvotes: 1

Related Questions