Question
Parsing XML File in Bridge
hi,
I have build a navbar in bridge with html. Within the html file I need to parse an xml document, to get some global preferences.
But the problem is accessing XML via Javascript DOM.
I have this scripts that on normal html pages do always work:
var xmlDoc
function loadXML()
{
//load xml file
// code for IE
if (window.ActiveXObject){
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load("./globals/preferences.xml");
readXML();
}
//code for Mozilla, etc.
else if (document.implementation && document.implementation.createDocument){
xmlDoc= document.implementation.createDocument("","",null);
xmlDoc.load("./globals/preferences.xml");
xmlDoc.onload=readXML;
}
else{
alert('Your browser cannot handle this script');
}
}
function readXML(){
alert(xmlDoc.getElementsByTagName("value")[0].firstChild.nodeValue);
}
But within bridge I always get the else alert.
Is there no XML accessibility via DOM in bridge. What esle can I use, XPath (which I have never used before :-(?
Operating Sytem: W-XP
Greetings from Cologne, Germany
Markus
I have build a navbar in bridge with html. Within the html file I need to parse an xml document, to get some global preferences.
But the problem is accessing XML via Javascript DOM.
I have this scripts that on normal html pages do always work:
var xmlDoc
function loadXML()
{
//load xml file
// code for IE
if (window.ActiveXObject){
xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
xmlDoc.async=false;
xmlDoc.load("./globals/preferences.xml");
readXML();
}
//code for Mozilla, etc.
else if (document.implementation && document.implementation.createDocument){
xmlDoc= document.implementation.createDocument("","",null);
xmlDoc.load("./globals/preferences.xml");
xmlDoc.onload=readXML;
}
else{
alert('Your browser cannot handle this script');
}
}
function readXML(){
alert(xmlDoc.getElementsByTagName("value")[0].firstChild.nodeValue);
}
But within bridge I always get the else alert.
Is there no XML accessibility via DOM in bridge. What esle can I use, XPath (which I have never used before :-(?
Operating Sytem: W-XP
Greetings from Cologne, Germany
Markus
