title: Read node of unusual xml - XmlDocument - Expression must evaluate to a node-set
body: <p>I've read and tried many threads - <a href="https://stackoverflow.com/questions/17356139/xml-errorsystem-xml-xpath-xpathexception-expression-must-evaluate-to-a-node-se">this answer</a>, <a href="https://stackoverflow.com/questions/157044/how-do-i-resolve-the-error-expression-must-evaluate-to-a-node-set-when-checkin">this</a> and <a href="https://stackoverflow.com/questions/17839989/expression-must-evaluate-to-a-node-set">this answer</a>. However, they are not applicable to me as I have really not usual xml:</p>
  
  <pre><code>var xmlString = @"&lt;?xml version=""1.0"" encoding=""windows-1251""?&gt;
  &lt;GetReply&gt;
      &lt;InformOne&gt;87&lt;/InformOne&gt;
          &lt;InfoReply&gt;
              &lt;![CDATA[&lt;?xml version='1.0' encoding='UTF-8'?&gt;
              &lt;S:Container xmlns:S=""http://schemas.xmlsoap.org/soap/envelope/""&gt;
                  &lt;S:Body&gt;
                      &lt;ns2:getReference31IPOResponse xmlns:ns2 = ""http://service.one.com/"" &gt;
                          &lt;return&gt;
                              &lt;reference31_1IPO xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:nil=""true""/&gt;
                              &lt;reference31_2IPO xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:nil=""true""/&gt;
                              &lt;amount&gt;0&lt;/amount&gt;
                              &lt;codeTypeObject&gt;0&lt;/codeTypeObject&gt;
                              &lt;returnCode&gt;4&lt;/returnCode&gt;
                              &lt;errorCode&gt;0&lt;/errorCode&gt;
                              &lt;errorMessage&gt;Something was wrong&lt;/errorMessage&gt;
                              &lt;title&gt;Foo Data&lt;/title&gt;
                          &lt;/return&gt;
                      &lt;/ns2:getReference31IPOResponse&gt;
                  &lt;/S:Body&gt;
              &lt;/S:Container&gt;]]&gt;
          &lt;/InfoReply&gt;
  &lt;/GetReply&gt;";
  XmlDocument xmlDoc = new XmlDocument();
  xmlDoc.LoadXml(xmlString);
  
  XmlDocument xmlDoc = new XmlDocument();
  xmlDoc.LoadXml(xmlString);
  var errorMessage = xmlDoc.SelectSingleNode("/GetReply/InformOne/InfoReply/CDATA/S:Container/S:Body/ns2:getReference31IPOResponse/return/errorMessage");
  </code></pre>
  
  <p>However, I see the following error:</p>
  
  <blockquote>
    <p>'Expression must evaluate to a node-set.'</p>
  </blockquote>
  
  <p>In addition, I even tried to get <code>InfoReply</code>, however the error is the same:</p>
  
  <pre><code>var errorMessage = xmlDoc.SelectSingleNode("/GetReply/InformOne/InfoReply/");
  </code></pre>
  
  <p>What I want is to read text in <code>errorMessage</code> node? </p>
  
  <p>Could you tell me please, what I am doing wrong?
  Any help would be greatly appreciated.</p>
  
  <p>It looks like <code>&lt;![CDATA[&lt;?xml version='1.0' encoding='UTF-8'?&gt;</code> breaks reading the rest nodes.</p>