在这个网址:http://www.ontobee.org/ontology/HP?iri=http://purl.obolibrary.org/obo/HP_0001065
当我用Chrome检查元素时,我可以看到HTML:
<div xmlns="http://www.w3.org/1999/xhtml" id="mainbody">
<link href="http://www.ontobee.org/public/css/ontology.css" rel="stylesheet" type="text/css" />
<script src="http://www.ontobee.org/public/js/ontobee.ontology.js"></script>
<h3 class="title">
<a href="http://www.ontobee.org/ontology/HP"> human phenotype ontology</a>
</h3>
<form action="http://www.ontobee.org/search" method="get" id="keyword-search">
<input name="ontology" id="ontology" type="hidden" value="HP" />
<div class="ui-widget">
<strong>
<label for="keywords">Keywords: </label>
</strong>
<input id="keywords" name="keywords" size="30" />
<input type="submit" name="submit" value="Search terms" />
</div>
</form>
<p class="section-title">
Class: <span class="section-title-value">Striae distensae</span></p>
<div class="iri">...我看到了HTML,但当我查看源代码时,我得到的是XML:
<!--
///////////////////////////////////////////////////////////////////////////////////////
//
// Annotation properties
//
///////////////////////////////////////////////////////////////////////////////////////
-->
<AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasRelatedSynonym"/>
<AnnotationProperty rdf:about="http://purl.obolibrary.org/obo/IAO_0000115"/>
<AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasDbXref"/>
<AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#inSubset"/>
<AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasAlternativeId"/>
<AnnotationProperty rdf:about="http://www.geneontology.org/formats/oboInOwl#hasOBONamespace"/>我需要一种方法来转换的RDF/XML为HTML的编程。有没有简单的方法可以做到这一点?我需要找到他们的XML转换文件吗?
注意:我需要这样做的原因是因为我需要下载一批这样的文档。我需要抓取数据。他们有一个SPARQ API,但我已经写了一个scraper,我认为我看到的是一个HTML文档,我很少从头到尾写一些东西而不测试它,但这一次我是出于某种原因这样做的。由于浏览器能够输出HTML,因此必须有一种方法可以通过浏览器插件完成此操作。
https://stackoverflow.com/questions/41405277
复制相似问题