Did you actually look at the Inner Exception as the exception messages tells you to? That would contain the XmlException
that was produced and would tell you exactly what is wrong with your RDF/XML including positional information i.e. where in the file the error is.
In your case your problem happens to be that you have defined the rdf
namespace twice on the same element i.e. you have two xmlns:rdf
attributes on your root rdf:RDF
element which makes your XML illegal.
If you remove that then it will be valid XML however it will still fail to parse in dotNetRDF because you have used the properties xml:startTime
and xml:endTime
without defining the xml
namespace. I guess dotNetRDF should probably allow those because xml:
is implicitly defined in XML though using the xml
namespace for anything other than XML syntax itself is generally a very bad idea and a symptom of bad data modeling.