title: Libxml2 doesn't parse a valid xml file (seg fault) on first line
body: <p>I installed <code>libxml2</code> and am using to compile a sample file that reads an xml document. I use the following to flags so I am using the libxml2:</p>
  
  <pre><code>gcc `xml2-config --cflags xml2-config --libs` libxml.c 
  </code></pre>
  
  <p>However it crashes right on the first line of parsing the file:</p>
  
  <pre><code>Error: &lt;unknown&gt;:1: syntax error near line 1
  context: &lt;?xml version="1.0" &gt;&gt;&gt;  encoding="UTF-8"?&gt; &lt;&lt;&lt; 
  Segmentation fault
  </code></pre>
  
  <p>I know that it is a valid xml file, the first couple of lines of the xml file looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1"&gt;
    &lt;model metaid="_case00010" id="case00010" name="case00010" timeUnits="time"&gt;
  </code></pre>
  
  <p>Does any one had this error before? Thanks.</p>
  
  <p>This is what I get when running gdb but am not sure what it means:</p>
  
  <pre><code>Cannot find new threads: generic error
  </code></pre>
  
  <p>The code is verbatim from here: <a href="http://www.xmlsoft.org/examples/parse1.c" rel="nofollow">http://www.xmlsoft.org/examples/parse1.c</a></p>
  
  <p>And the xml file passes a validation check.</p>