I installed libxml2
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:
gcc `xml2-config --cflags xml2-config --libs` libxml.c
However it crashes right on the first line of parsing the file:
Error: <unknown>:1: syntax error near line 1
context: <?xml version="1.0" >>> encoding="UTF-8"?> <<<
Segmentation fault
I know that it is a valid xml file, the first couple of lines of the xml file looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level3/version1/core" level="3" version="1">
<model metaid="_case00010" id="case00010" name="case00010" timeUnits="time">
Does any one had this error before? Thanks.
This is what I get when running gdb but am not sure what it means:
Cannot find new threads: generic error
The code is verbatim from here: http://www.xmlsoft.org/examples/parse1.c
And the xml file passes a validation check.