Hi,
I want to read a XML file which has data for my extension. I want to read that file inside the extension and put data to an array. I tried to create DOM object parser and read from that object in my extension .But is not working properly, Here is part of my code
var systemPrincipal = Components.classes["@
mozilla.org/systemprincipal;1"]
.createInstance(Components.interfaces.nsIPrincipal);
var parser = Components.classes["@
mozilla.org/xmlextras/domparser;1"]
.createInstance(Components.interfaces.nsIDOMParser);
var doc = parser.parseFromString("<?xml version=1.0 encoding=ISO-8859-1?><TestSuite xmlns:xsi=
http://www.w3.org/2001/XMLSchema-instancexsi:noNamespaceSchemaLocation=file://C:/seleniumLab/vtaf/vtaf/xsd/TestSuite.xsd ><TestCase name=logintoChorus><LoadPage>LoginPage<LoadPage/> </TestCase></TestSuite>", "application/xml");
alert(doc); //
this gives me the xmldoc objectalert(doc.getElementByTagName("LoadPage")); //
this gives me nothingI am new to DOM object also ? Can you give me any advice
Thanks