title: Getting Segmentation Fault with TinyXML
body: <p>I currently have an XML file which I'm parsing using TinyXML. The top of my XML file look as so :</p>
  
  <pre><code>&lt;Classroom&gt;12
      &lt;ClassName&gt;name&lt;/ClassName&gt;
      ...
  &lt;/Classroom&gt;
  </code></pre>
  
  <p>I'm attempting to access the text in ClassName. I am currently getting a segmentation fault using this:</p>
  
  <pre><code>TiXmlDocument doc;
  doc.LoadFile(file);
  TiXmlHandle  handle(&amp;doc);
  
  TiXmlElement * child = handle.FirstChild().FirstChild().ToElement();
  cout&lt;&lt;child-&gt;GetText();
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p>Thanks!</p>