I have an OWL file prepared in Protege by someone else. I'm trying to parse it with the following Python code, but keep getting a parse error.
import rdflib
g=rdflib.Graph()
result = g.parse(r'myfile.owl')
rdflib.exceptions.ParserError: file:///myfile.owl:461:27: Repeat node-elements inside property elements: http://www.w3.org/2002/07/owl#Class
The line and character numbers refer to the start of the <Class IRI="#Gas"/>
line in the OWL file. Does this indicate that the 'SubClassOf' construct is wrong, or that I need another plugin to use rdflib properly, or something else? The OWL file looks like this:
<Declaration>
<Class IRI="#Acetylene"/>
</Declaration>
<Declaration>
<Class IRI="#Gas"/>
</Declaration>
...
<SubClassOf>
<Class IRI="#Acetylene"/>
<Class IRI="#Gas"/>
</SubClassOf>