我不知道如何解析这个文件,有人能告诉我如何解析它吗? 该文件位于下方。我试图找到解析约3天的方法。
<?xml version="1.0"?>
<!DOCTYPE Ontology [
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY owl2xml "http://www.w3.org/2006/12/owl2-xml#" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY ontology_people1 "http://www.okkam.org/ontology_people1.owl#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>
<Ontology xmlns="http://www.w3.org/2006/12/owl2-xml#"
xml:base="http://www.w3.org/2006/12/owl2-xml#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:owl2xml="http://www.w3.org/2006/12/owl2-xml#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:ontology_people1="http://www.okkam.org/ontology_people1.owl#"
URI="http://www.okkam.org/ontology_people1.owl">
<SubClassOf>
<Class URI="&ontology_people1;Address"/>
<Class URI="&ontology_people1;Location"/>
</SubClassOf>
<Declaration>
<Class URI="&ontology_people1;Address"/>
</Declaration>
......
</Ontology>
<!-- Generated by the OWL API (version 2.2.1.1138) http://owlapi.sourceforge.net -->
答案 0 :(得分:1)
答案 1 :(得分:1)
这可以使用OWLAPI加载的默认解析器进行解析。
这应该足够了:
def abc(username, password, host, a, b, c, d, e)