title: libxml2 can´t get content from node
body: <p>I am using libxml in C and this is how I create xml:</p>
  
  <pre><code>xmlDocPtr createXmlSegment(char *headerContent, char *dataContent)
  {
    xmlDocPtr doc;
    doc = xmlNewDoc(BAD_CAST "1.0");
    xmlNodePtr rdt, header, data;
    rdt = xmlNewNode(NULL, BAD_CAST "rdt-segment");
    xmlSetProp(rdt, "id", "1");
    header = xmlNewNode(NULL,BAD_CAST "header");
    data = xmlNewNode(NULL, BAD_CAST "data");
    xmlNodeSetContent(header, BAD_CAST headerContent);
    xmlNodeSetContent(data, BAD_CAST dataContent);
    xmlAddChild(rdt, header);
    xmlAddChild(rdt, data);
    xmlDocSetRootElement(doc, rdt);
    return doc;
  }
  </code></pre>
  
  <p>and this is how I want get data from that xml:</p>
  
  <pre><code>int getDataFromXmlSegment(char *data, char *header, char *content)
  {
    xmlDocPtr doc = xmlReadMemory(data, strlen(data), NULL, NULL, XML_PARSE_NOBLANKS);
    xmlNode *rdt = doc-&gt;children;
    xmlNode *headerNode = rdt-&gt;children;
    header = (char *)headerNode-&gt;content;
    content = (char *)headerNode-&gt;next-&gt;content;
    printf("header: %s, content: %s", header, content);
    return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>When I test headerNode->name or ->next->name then the names are correct (it´s names of that elements) but content returns null. Anyone knows where is problem?</p>