Index | OAT homepage | OpenLink Software

n3.js

n3.js

N3/Turtle parser. (see also RDF parser)

Functions

OAT.N3.toTriples(string)

Parses a N3/Turtle RDF document into a JavaScript array of triples which is then returned. Input should be a string containing serialized RDF.

Example


var callback = function(string) {
        var triples = OAT.RDF.toTriples(string);
        alert("There are " + triples.length + " triples.");
}
OAT.AJAX.GET("myData.n3", false, callback, {type:OAT.AJAX.TYPE_TEXT});
Copyright (C) 2005-2009 OpenLink Software