Index | OAT homepage | OpenLink Software

# OATDOCn3

- OATDOCn3
- _ _ n3.js
- _ _ _ _ Functions
- _ _ _ _ _ _ OAT.N3.toTriples(string)
- _ _ _ _ Example

## 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-2008 OpenLink Software