rdf.js

RDF/XML parser.


Functions


OAT.RDF.toTriples(xmlDoc)

Parses an RDF/XML document into an array of triples (which is then returned). Input should be in xmlDocument format, e.g. created with OAT.Xml.createXmlDoc() or as a result of AJAX call with type:OAT.AJAX.TYPE_XML.

var callback = function(xmlDoc) {
	var triples = OAT.RDF.toTriples(xmlDoc);
	alert("There are "+triples.length+" triples.");
}
OAT.AJAX.GET("myData.rdf",false,callback,{type:OAT.AJAX.TYPE_XML});