title: Tinyxml to print attributes
body: <p>I'm trying to get std::string from attribute's value with TinyXml.
  The only thing I can get is a const char * val, and I can't find any way to convert from const char * to a std::string.</p>
  
  <p>so two possible answers to that:
  1. How to get a string of an attribute with TinyXml?
  2. How to convert <strong>const char *</strong> val to <strong>string</strong> val.</p>
  
  <p>this is the code I have now:</p>
  
  <pre><code>TiXmlElement* data;
  data-&gt;Attribute("some_name"); // return const char * which seems like unconvertible.
  </code></pre>
  
  <p>After googeling, I tried this:</p>
  
  <pre><code>char * not_const= const_cast&lt;char *&gt; (data-&gt;Attribute("some_name"));
  </code></pre>
  
  <p>There are no errors in the code itself, but after compiling and running I get exceptions.</p>