Reputation: 1779
On this URL: http://www.ontobee.org/ontology/HP?iri=http://purl.obolibrary.org/obo/HP_0001065
When I inspect elements with Chrome, I can see the 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">...
I see the HTML but when I view the source, I get 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"/>
I need a way to convert the RDF/XML into HTML programatically. Is there simple way to do this? Do I need to find their XML transform file?
NOTE: The reason I need to do this is because I need to download a batch of these documents. I need to scrape the data. They have a SPARQ API, but I already wrote a scraper thinking that what I was looking at was a HTML document, I rarely just write something from beginning to end without testing it as I go along, but some reason this time I did. There must be a way to do it through a browser plugin since the browser is able to output the HTML.
Upvotes: 1
Views: 427
Reputation: 245
The RDF on the page is for the class being displayed. So,no, you could not engineer the HTML of the page from the RDF.
If you're looking for the HTML of the page itself, its easier for you to get the HTML from the inspect tool of the browser.
Upvotes: 1