title: How to retrieve node and particular element string from xml file in C++ using libxml2 by using xpath?
body: <p>How to retrieve text value in c++ using libxml?</p>
  
  <p>Here is the XML:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Help xmlns="http://www.example.org/HelpFileStructure" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/HelpFileStructure HelpFileStructure.xsd "&gt;
    &lt;Text&gt;dfgdfg&lt;/Text&gt;
  &lt;/Help&gt;
  </code></pre>
  
  <p>Code:</p>
  
  <pre><code>void Help::HelpName()
  {
      string Help_text;
      parser.parse_file(XmlFileName);
      Node* root = parser.get_document()-&gt;get_root_node();
      NodeSet result = root-&gt;find("/Help/Text");
      Element *first_element = (Element *)result.at(0);
      Help_text = first_element-&gt;get_child_text()-&gt;get_content();
  }
  </code></pre>