Index | OAT homepage | OpenLink Software

# OATDOCrdf

- OATDOCrdf
- _ _ rdf.js
- _ _ _ _ Functions
- _ _ _ _ _ _ OAT.RDF.toTriples(xmlDoc, url)
- _ _ _ _ Constants
- _ _ _ _ _ _ OAT.RDFData.DISABLE_HTML
- _ _ _ _ _ _ OAT.RDFData.DEREFERENCE
- _ _ _ _ _ _ OAT.RDFData.BOOKMARK
- _ _ _ _ _ _ OAT.RDFData.FILTER
- _ _ _ _ Example

## rdf.js

RDF/XML parser. (see also N3/Turtle parser )

### Functions

#### OAT.RDF.toTriples(xmlDoc, url)

Parses an RDF/XML document, `xmlDoc` 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 of type XML . `Url` is to use for prefix and is optional.

### Constants

#### OAT.RDFData.DISABLE_HTML

ToBeDone

#### OAT.RDFData.DEREFERENCE

ToBeDone

#### OAT.RDFData.BOOKMARK

ToBeDone

#### OAT.RDFData.FILTER

ToBeDone

### Example

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

Copyright (C) 2005-2008 OpenLink Software