TechArticle

RDF XML

Infobox

headline
RDF XML
description
XML-based W3C serialization for RDF graphs.

RDF/XML is a W3C-standard XML serialization of RDF. It is designed primarily for machine-to-machine interchange, not for hand authoring. The underlying data model is still RDF triples; RDF/XML is just one concrete syntax for writing them down.

Compared with Turtle or JSON LD, RDF/XML is usually more verbose and less pleasant for humans to edit directly, but it remains important for compatibility with older semantic-web tools and XML-oriented systems.

Hello world

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:schema="https://schema.org/">
  <rdf:Description rdf:about="https://example.org/people/alice">
    <schema:givenName>Alice</schema:givenName>
  </rdf:Description>
</rdf:RDF>

This expresses the RDF statement:

  • subject: https://example.org/people/alice
  • predicate: https://schema.org/givenName
  • object: Alice

In Wiki CLI

Use wiki export -f xml when you want RDF serialized in RDF/XML form.

References

ContentsOn this page

[hide]

Backlinks