This is an annotated example file. If you don’t understand RDF/XML, it will be baffling and obscure. If you do, it will be patronising and unnecessary. If you have some familiarity with RDF, but still find the syntax a little counterintuitive, it may help you to get started.
<?xml version="1.0" encoding="iso-8859-1" standalone="yes"?>The document element is
rdf:RDF. We also declare prefixes for the other XML namespaces we’re going to use –
mvifor the Mivvi properties, and
dcfor titles and dates.
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:mvi="http://mivvi.net/rdf#" xmlns:dc="http://purl.org/dc/elements/1.1/">First, we declare a television series, with the identifier
http://www.example.com/. If others uses the same URI, we’ll know that they mean the same series. As well, we give it a title.
<mvi:Series rdf:about="http://www.example.com/" dc:title="The Example Show">The series has ‘seasons’, and a list of them will folow.
<mvi:seasons> <rdf:Bag>For each season, we declare it and assign an identifier.
<rdf:li> <mvi:Season dc:title="Season 1" rdf:about="http://www.example.com/season-1.html" mvi:seasonNumber="1">Now, similarly to providing a series’ seasons, we provide this season’s episodes:
<mvi:episodes> <rdf:Seq>Finally, an episode. The identifier (
rdf:about) creates a common term for this program, and the details (title, date) can hang off that.
<rdf:li> <mvi:Episode rdf:about="http://www.example.com/ep1-1.html" dc:title="An Initial Example" dc:date="1900-01-01" /> </rdf:li>Another episode.
<rdf:li> <mvi:Episode rdf:about="http://www.example.com/ep1-2.html" dc:title="A Subsequent Example" dc:date="1900-01-08" /> </rdf:li> ...After any number of seasons and episodes, the closing tags:
... </rdf:Seq> </mvi:episodes> </mvi:Season> </rdf:li> </rdf:Bag> </mvi:seasons> </mvi:Series> </rdf:RDF>
The full file is here as RDF, and presented here as HTML. Also, an excerpt presented as a graph may help to show the relation between the parts.