hudi
hudi

Reputation: 16525

Exception when I want to load model with jena

I am working with jena library. When I want to open this address:

model = FileManager.get().loadModel("http://dbpedia.org/resource/Shlomo_Breznitz");

I got this exception:

http://dbpedia.org/resource/Shlomo_Breznitz(line 54 column 8): Element or attribute do not match QName production: QName::=(NCName':')?NCName.

It is a bug of jena, because this exception occurs just here (other rdf which I try to read are OK) or is there something wrong with this rdf file?

Upvotes: 2

Views: 450

Answers (1)

RobV
RobV

Reputation: 28636

This means that the data being returned from DBPedia is malformed (which is unfortunately quite common) - putting the URL into the W3C RDF/XML Validator also shows this error

The only workaround currently is to download the file and manually fix the error yourself prior to parsing it with Jena

Upvotes: 4

Related Questions