[Project_owners] Parsing local XML file

Jawahar Swaminathan jawahar at ebi.ac.uk
Fri Feb 11 22:02:00 EST 2005

Dear People,

Thank you for all your suggestions regarding parsing a local XML file. I 
used the following to sucessfully parse my xml file.



ioService Components.classes["@mozilla.org/network/io-service;1"].getService(Components.interfaces.nsIIOService);

uri = ioService.newFileURI(file);    


No problems there !!

Thanks once again.

cheers - Jawahar

Neil wrote:

> Didier Ernotte wrote:
>> If you use this:
>>    var file =
>> file=Components.classes["@mozilla.org/file/directory_service;1"].getService(Components.interfaces.nsIProperties).get("ProfD", 
>> Components.interfaces.nsIFile);
>>    file.append("bioCyc.xml");
>> you have a object that refers to the bioCyc.xml file in your profile 
>> directory on every platform.
> Although you'll still want to convert that to a file URI using the IO 
> service so that you can pass the spec to xmlDoc.load().
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners

More information about the Project_owners mailing list