title: MSXML loadXML won't load elements with namespace prefixes... Why?
body: <p>Hiho,</p>
  
  <p>i guess, it's a pretty stupid question, but i had to switch to C/C++ recently and haven't done this in years.
  And right now I'm stuck on the following:</p>
  
  <p>Given XML Element as a simple String:</p>
  
  <pre><code>&lt;myns:factor&gt;1000&lt;/myns:factor&gt;
  </code></pre>
  
  <p>I have to parse the string, add the resulting Element to a surrounding MSXML2 DOM object within the same Namespace. </p>
  
  <p>Right now i try it this way:</p>
  
  <pre><code>  HRESULT hr;
  
    MSXML2::IXMLDOMDocument2Ptr l_xmlFrame;
    MSXML2::IXMLDOMElementPtr l_xmlFrameDoc;
  
    hr = l_xmlFrame.CreateInstance(__uuidof(MSXML2::DOMDocument));
  
    if( !FAILED(hr) ) {
  
      l_xmlFrame-&gt;async = VARIANT_FALSE;
      l_xmlFrame-&gt;validateOnParse = VARIANT_TRUE;
  
      // p_strUnit holds the xml as a String
      l_xmlFrame-&gt;loadXML(p_strUnit);
  
    }
  </code></pre>
  
  <p>The <em>loadXML(...)</em> call just fails , <strong>but:</strong></p>
  
  <p>if i remove the namespace declarations and the element looks like this:</p>
  
  <pre><code>&lt;factor&gt;1000&lt;/factor&gt;
  </code></pre>
  
  <p>the call works <strong><em>perfectly</em></strong>!</p>
  
  <p>I really don't understand, why the loadXML function wont parse the string, when the Namespace declarations are set.</p>
  
  <p>Any help appreciated!!!!! :)</p>
  
  <p>Thanks!</p>