hi all...,
I am building a addon where i am using a xml file as a database.
I wrote the following script for the xml file(hash.xml) shown below....
here in the js its not giving the correct result...
when i write statement alert(z.length); its returning 0.
so there is problem with xmlDoc.getElementsByTagName... that statement is not executing correctly... but the same code works fine when i implement in a html... but not working in addon... please can anyone help me....

Code:
<database>
<hashvalues>
	<hash>cbdae1f6b39d7fd774865835630e75d46fa90feb</hash>
	<hash>a9993e364706816aba3e25717850c26c9cd0d89d</hash>
	<hash>c22b5f9178342609428d6f51b2c5af4c0bde6a42</hash>
	<hash>2db0f771d292369e2c61d05bb70749a3bb500e9f</hash>
	<hash>8f68a9e01757be3ff951111cfd8efc4c1126252a</hash>
	<hash>a3138097f1fc4fa021da2e67b46c3ee1deb800a3</hash>
	<hash>8642148cfe6d6fee893012c6bdbde3e71d0c1c42</hash>
	<hash>79c023c060d96ba374f418d869f7303346205ae4</hash>
	
</hashvalues>
</database>

Code:
var xmlDoc=document.implementation.createDocument("","",null);
xmlDoc.async="false";
xmlDoc.load("hash.xml");
z=xmlDoc.getElementsByTagName("hash");
for (i=0;i<z.length;i++)
{	
x=xmlDoc.getElementsByTagName("hash")[i];
y=x.childNodes[0];
if((y.nodeValue.search(s1))==0)
		return 0;
}