I'm creating a script where I extract news info from a RSS file.

I use an XMLDocument object to do this, so I have to ask the user
for permission to load the news url. This I can do like so:

netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');

But apparently I also need to get permission to use the
XMLDocument.getElementsByTagName method.
Anyone know what this permission is called?
Or can anyone point me to a list of known permissions?

If you want to try, here's the code:

var D;  // The XMLDocument object
function loadHandler(){
  var s='';
  var os=D.getElementsByTagName('item');  ////// <--- FAILS
  alert(os.length);
  for(i=0;i<os.length;i++){
    s+='<a
href=\''+os[i].childNodes[1].text+'\'>'+os[i].childNodes[0].text+'</a><br>'+
os[i].childNodes[2].text+'<br><br>';
  }
  alert(s);
/*  W=open();
  W.document.write(s);
  W.document.close();*/
}

try{

netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
  D=document.implementation.createDocument('','',null);
  D.addEventListener('load',loadHandler,false);
  D.load('http://www.dr.dk/nyheder/html/nyheder/rss/');
}
catch(e){
  alert(e);
}

Here's the news feed:
http://www.dr.dk/nyheder/html/nyheder/rss/

TIA
Troels


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

Reply via email to