title: Can xmlNodeGetContent() return NULL?
body: <p>libxml2 has function <code>xmlNodeGetContent()</code>, which is documented as follows in <a href="http://xmlsoft.org/html/libxml-tree.html#xmlNodeGetContent" rel="nofollow noreferrer">http://xmlsoft.org/html/libxml-tree.html#xmlNodeGetContent</a>:</p>
  
  <pre><code>xmlChar *xmlNodeGetContent  (const xmlNode * cur)
  </code></pre>
  
  <blockquote>
    <p>Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted.</p>
    
    <p>cur:  the node being read
    Returns:    a new #xmlChar * or NULL if no content is available. It's up to the caller to free the memory with xmlFree().</p>
  </blockquote>
  
  <p>If <code>cur</code> is an empty node, for example <code>&lt;foo/&gt;</code> (or the equivalent <code>&lt;foo&gt;&lt;/foo&gt;</code>), then <code>xmlNodeGetContent()</code> returns an empty string, not <code>NULL</code>, and that is fine IMO.</p>
  
  <p>But then, in which case would <code>xmlNodeGetContent()</code> return <code>NULL</code>? What would be a minimalistic XML example where that would happen?</p>