Openanzo has a powerful RDF javascript library which has RDF parsing and serialization capabilities.


An RDF/XML parser ported from Tabulator.
var graph = new anzo.rdf.NamedGraph(); // graph into which triples are placed
anzo.rdf.parser.TabulatorParser.parse(rdfXMLString, graph); // parse


An RDF N-Triples parser.
var graph = new anzo.rdf.NamedGraph(); // the graph into which the parsed data is placed
anzo.rdf.parser.NTripleParser.parse(nTripleString, graph); // run the parser on the given N-Triple string


An RDF N-Triples serializer.
var graph = new anzo.rdf.NamedGraph(); // the graph we want to serialize
// we add a bunch of statements to graph via the add() method
var nTripleString = anzo.rdf.serializer.NTripleSerializer.serialize(graph); // serialize the graph to N-Triples