Skip to content

file: SPARQL XML output

petermr edited this page Nov 30, 2020 · 1 revision

SPARQL-XML output

description

Raw XML received from Wikidata query service

Format

example

<?xml version='1.0' encoding='UTF-8'?>
<sparql xmlns='http://www.w3.org/2005/sparql-results#'>
	<head>
		<variable name='wikidata'/>
		<variable name='wikidataLabel'/>
		<variable name='_iso3166'/>
		<variable name='wikipedia'/>
		<variable name='alt'/>
		<variable name='synonym'/>
		<variable name='wikidataDescription'/>
		<variable name='term'/>
	</head>
	<results>
		<result>
			<binding name='wikidata'>
				<uri>http://www.wikidata.org/entity/Q889</uri>
			</binding>
			<binding name='wikipedia'>
				<uri>https://en.wikipedia.org/wiki/Afghanistan</uri>
			</binding>
			<binding name='wikidataLabel'>
				<literal xml:lang='en'>Afghanistan</literal>
			</binding>
			<binding name='wikidataDescription'>
				<literal xml:lang='en'>sovereign state situated at the confluence of Western, Central, and South Asia</literal>
			</binding>
			<binding name='synonym'>
				<literal xml:lang='en'>AFG, af, Islamic Republic of Afghanistan</literal>
			</binding>
			<binding name='_iso3166'>
				<literal>AF</literal>
			</binding>
			<binding name='alt'>
				<literal xml:lang='en'>AFG, af, 🇦🇫, Islamic Republic of Afghanistan</literal>
			</binding>
			<binding name='term'>
				<literal xml:lang='en'>Afghanistan</literal>
			</binding>
		</result>
		<result>
			<binding name='wikidata'>
				<uri>http://www.wikidata.org/entity/Q222</uri>
			</binding>
			<binding name='wikipedia'>
				<uri>https://en.wikipedia.org/wiki/Albania</uri>
			</binding>
			<binding name='wikidataLabel'>
				<literal xml:lang='en'>Albania</literal>
			</binding>
			<binding name='wikidataDescription'>
				<literal xml:lang='en'>sovereign state in Southeast Europe</literal>
			</binding>
			<binding name='synonym'>
				<literal xml:lang='en'>ALB, al, Republic of Albania, Republika e Shqipërisë, Shqipërisë</literal>
			</binding>
			<binding name='_iso3166'>
				<literal>AL</literal>
			</binding>
			<binding name='alt'>
				<literal xml:lang='en'>ALB, al, 🇦🇱, Republic of Albania, Republika e Shqipërisë, Shqipërisë</literal>
			</binding>
			<binding name='term'>
				<literal xml:lang='en'>Albania</literal>
			</binding>
		</result>
...