title: tinyxml2 load xml errorID 10
body: <p>I'm working on a project in C++ using tinyxml2. 
  I have an issue with the xml parsing , I get an errorID 10 and the error message is "XML_ERROR_PARSING_TEXT" when the file is loaded.</p>
  
  <p>This is the following xml in question:</p>
  
  <pre><code>&lt;Game&gt;
    &lt;Window&gt;
      &lt;width&gt;600&lt;/width&gt;
      &lt;height&gt;500&lt;/height&gt;
      &lt;background&gt;joliBackgroundDeGael.jpg&lt;/background&gt;
    &lt;/Window&gt;
    &lt;Square&gt;
      &lt;Mario&gt;
        &lt;size&gt;
          &lt;width&gt;30&lt;/width&gt;
          &lt;height&gt;15&lt;/height&gt;
        &lt;/size&gt;
        &lt;speedPerFrame&gt;5&lt;/speedPerFrame&gt;
        &lt;font&gt;
          &lt;stop&gt;stopMario.jpg&lt;/stop&gt;
          &lt;run&gt;runMario.jpg&lt;/run&gt;
          &lt;jump&gt;jumpMario.jpg&lt;/jump&gt;
        &lt;/font&gt;
      &lt;/Mario&gt;
    &lt;/Square&gt;
  &lt;/Game&gt;
  </code></pre>
  
  <p>The xml file is valid in the W3C validator. 
  So I think the problem is not here, but maybe here :</p>
  
  <pre><code>void parseXML::getDoc()
  {
      this-&gt;doc.LoadFile(this-&gt;path);
      if (this-&gt;doc.ErrorID() != 0)
      {
          printf("load file=[%s] failed\n", this-&gt;doc.GetErrorStr1());
          printf("load file=[%s] failed\n", this-&gt;doc.GetErrorStr2());
      }
  }
  </code></pre>
  
  <p>When I look in the LoadFile function with a breakpoint, I see that the load file is the same as below.</p>
  
  <p>Here the complete code :</p>
  
  <pre><code>#include "caracteristique.h"
  #include &lt;iostream&gt;
  
  #include &lt;direct.h&gt;
  #define GetCurrentDir _getcwd
  
  using namespace tinyxml2;
  
  const char* parseXML::path = "XMLType.xml";
  
  void parseXML::getDoc()
  {
      this-&gt;doc.LoadFile(this-&gt;path);
      if (this-&gt;doc.ErrorID() != 0)
      {
          printf("load file=[%s] failed\n", this-&gt;doc.GetErrorStr1());
          printf("load file=[%s] failed\n", this-&gt;doc.GetErrorStr2());
      }
  }
  
  int parseXML::getWindowHeight()
  {
      if (this-&gt;doc.Error())
          this-&gt;getDoc();
  
      XMLElement *root = this-&gt;doc.RootElement();
      if (!root)
      {
          XMLElement *window = root-&gt;FirstChildElement("Window");
          if (!window)
              std::cout &lt;&lt;  window-&gt;FirstChildElement("height")-&gt;FirstChild()-&gt;ToText() &lt;&lt; std::endl;
      }
      return 0;
  }
  </code></pre>
  
  <p>An idea ?</p>
  
  <p>Thanks for your help,</p>