As my first rdf experiment, I created a very simple local chrome app
values from the local rdf file and writes them to the main document. I
The following is the key code snippet which WORKS :
var rdfService =
var main_ds =
> Running that in my pages produces a correct 'welcome to' message with
> the data from the local rdf file.
> my question / confusion is that if don't do the two 'instanceof'
> checks, but just _assume_ t is a literal, it doesn't work. here is the
> snippet of code for the one which does NOT work :
Because GetTarget returns an nsIRDFNode, which may or may not be an
nsIRDFLiteral. The instanceof operator calls QueryInterface on the
object which then makes it a literal.