我正在尝试从英国数据社区获取有关here规划决策的信息。考虑到他们提供的SPARQL endpoint,我尝试运行该查询。这是我第一次使用SPARQL运行查询,所以我遵循了here中的一般指示,并考虑使用来自该站点的其他数据的previous thread。
我的代码看起来像这样:
library(SPARQL)
# create the query
endpoint <- "http://opendatacommunities.org/sparql"
query <-
"PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX qb: <http://purl.org/linked-data/cube#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
SELECT *
WHERE {
?s ?p ?o
}"
# submit query
qd <- SPARQL(endpoint,query)然而,我得到了以下错误:
Error: XML content does not seem to be XML: 'Request Timeout'
我试图通过在SPARQL()中将format参数显式地声明为xml (qd <- SPARQL(endpoint,query, format = "xml"))来编辑我的查询,但是我得到了类似的结果。如果有人能给出一些关于哪里出问题的提示,我将不胜感激。
发布于 2016-09-09 05:55:39
尝试使用终结点"http://opendatacommunities.org/sparql.xml“。
您的终结点似乎不是终结点,而只是一个HTML页。
https://stackoverflow.com/questions/39396613
复制相似问题