well, here is the rdf file

============= R D F ========================================

<?xml version="1.0" encoding="windows-1251"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
         xmlns:ftdlg="http://www.kilt.by/rdf#";>
   <RDF:Description RDF:about="urn:ftdlg:1">
     <ftdlg:fleet-id>7</ftdlg:fleet-id>
     <ftdlg:car-id>91231243</ftdlg:car-id>
     <ftdlg:delivery-coef>75%</ftdlg:delivery-coef>
     <ftdlg:car-model>Mitsubishi Galant</ftdlg:car-model>
     <ftdlg:car-number>2799 PO</ftdlg:car-number>
     <ftdlg:driver>hooch</ftdlg:driver>
   </RDF:Description>
  <RDF:Seq RDF:about="urn:ftdlg:data">
    <RDF:li>
      <RDF:Seq RDF:about="urn:ftdlg:1"/>
    </RDF:li>
  </RDF:Seq>
</RDF:RDF>
========================================================

so i used code akin
============= C O D E ========================================
//[rdf] variable is [Components.interfaces.nsIRDFService]
var ds =
rdf.GetDataSourceBlocking("chrome://refs/content/refs/dialogs/ft_dlg.rdf");
ds = ds.QueryInterface(Components.interfaces.nsIRDFDataSource);

//well, while using GetDataSource() 
//the following code doesn't work...is it
//rigth reaction? afaik, GetDataSourceBlocking() only waits 
//until remote resource is definitely loaded...

var mysource = ds.GetAllResources();   
var counter = 0;
while( mysource.hasMoreElements() ){
  var mydata = mysource.getNext();
  mydata = mydata.QueryInterface(Components.interfaces.nsIRDFResource);
  alert(mydata.Value);
  counter++;
}

========================================================

so i can see "urn:ftdlg:1" and "urn:ftdlg:data" messageboxes. but i
want to retrieve "91231243", "75%", "Mitsubishi Galant" and so on with
a desirable possibility of traversing through all description tags (it
would be also entries like "urn:ftdlg:2", "urn:ftdlg:3" etc)

thanx.
_______________________________________________
Mozilla-xpcom mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-xpcom

Reply via email to