Using Sarissa and selectSingleNode
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Using Sarissa and selectSingleNode

From: <scot.haynes@ukgateway.net>
Date: Fri Mar 31 2006 - 00:29:22 CEST

Can anyone help me with the following problem I'm having using the
Sarissa parser. I am running the following java script

var xml = Sarissa.getDomDocument();
xml.async = false; //Load my xml file containing many child Country
elements.
var objNodeList = xml.getElementsByTagName("Country");
//Walk the Dom
var myCountry =
objNodeList.item(sourceCountry.value).getAttribute("Name");
var xpathstring = "//Country[@Name = '" + myCountry + "']";
var xmlCountry = xml.documentElement.selectSingleNode(xpathstring);

For some reason in the Firefox 1.5.0.1 browser the xmlCountry variable
is not being populated.

Does anyone have a suggestion as to how I can get this code to work
properly in Firefox?
Received on Mon May 1 04:33:04 2006