%META:TOPICPARENT{name="OATDOCIndex"}%
---+ n3.js
N3/Turtle parser. (see also [[OATDOCrdf][RDF parser]])
%TOC%
---++ Functions
---+++ OAT.N3.toTriples(string)
Parses a N3/Turtle RDF document into a [[JavaScript][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});
CategoryDocumentation CategoryOAT CategoryOpenSource