Subj : Problem with writing to RDF file To : netscape.public.mozilla.jseng From : "Mrva" Date : Tue Apr 22 2003 11:28 am I have form in XUL application which collects data and that data is supposed to be written to RDF file. But there is a problem.Data is shown in tree, but it is not written to RDF file. Like Flush method doesn't work.Here is function that collects data and writes it to file: function dodaj() { var RDF = Components .classes["@mozilla.org/rdf/rdf-service;1"] .getService(Components.interfaces.nsIRDFService); var RDFC = '@mozilla.org/rdf/container;1'; RDFC = Components.classes[RDFC].createInstance(); RDFC = RDFC.QueryInterface(Components.interfaces.nsIRDFContainer); var RDFCUtils = '@mozilla.org/rdf/container-utils;1'; RDFCUtils = Components.classes[RDFCUtils].getService(); RDFCUtils = RDFCUtils.QueryInterface(Components.interfaces.nsIRDFContainerUtils); var tablica=document.getElementById("rezultati"); var source=tablica.database.GetDataSources(); datasource=source.getNext(); datasource.QueryInterface(Components.interfaces.nsIRDFDataSource); rootnode = RDF.GetResource("urn:root"); RDFC.Init(datasource,rootnode); var newnode=RDF.GetResource("urn:root:knjiga"+(RDFC.GetCount()+1)) var ISBN=document.getElementById('dodajisbn').value; predicate = RDF.GetResource('knjiga#ISBN'); object = RDF.GetLiteral(ISBN); datasource.Assert(newnode,predicate,object,true); RDFC.AppendElement(newnode); datasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource).Flus h(); } Here is RDF file that is datasource: 953-173-826-2 86-11-04531-9 I don't really know what could be the problem, why data is not written to file? Thanks! Marija .