As an example, consider the following snippet which is a complete HTML page, retrieving the names of friends of Denny from his FOAF file and displaying the results on the page.
<!doctype html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script> <script src="http://km.aifb.kit.edu/sites/spark/src/jquery.spark.js"></script> </head> <body> <h1>Denny's friends</h1> <div class="spark" data-spark-rdf="http://simia.net/foaf.rdf" data-spark-format="ul" data-spark-query="SELECT ?entity ?label WHERE { <http://simia.net/foaf.rdf#denny> foaf:knows ?entity . ?entity foaf:name ?label }"> loading </div> </body> </html>
This is a list of example sparks, using different visualisers and data sources. The first link points to a page that makes a dynamic query. The second example uses a locally saved answer, so that the demo will display results even if the actual data source should not be accessible for some reason.