Background
Import & Export
Import Elements
Examples
Basic Examples
See Also
GraphStore`
Wolfram Language code:
Wolfram Language code:
Wolfram Language code:
NTriples (.nt)
Background
-
- MIME type: application/n-triples.
- Line-based format for RDF graphs.
- N-Triples is specified at https://www.w3.org/TR/n-triples/.
Examples
Basic Examples (1)
Needs["GraphStore`"]Import data in the N-Triples format:
store = ImportString["
<http://example.org/tom> <http://www.w3.org/2000/01/rdf-schema#label> \"Tom\" .
<http://example.org/tom> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
<http://example.org/tom> <http://xmlns.com/foaf/0.1/knows> <http://example.org/anna> .
<http://example.org/anna> <http://www.w3.org/2000/01/rdf-schema#label> \"Anna\" .
<http://example.org/anna> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
", "NTriples"]Export the same data as N-Triples:
ExportString[store, "NTriples"]