View Full Version : js-shell / firefox behave differently

10-18-2008, 12:38 PM
Hello all.
I am using the xml2array (http://www.openjs.com/scripts/xml_parser/) script to parse some xml. The problem is, that everything works perfectly when I test it using this page -- http://www.squarefree.com/shell/shell.html , but the behavior changes when I use it in localhost. I'm using Firefox 3.0.3.

For instance, for a simple XML like this --

<?xml version='1.0'?>

output inside the JavaScript shell I mentioned before is 3485 (output['int']) , but the same expression (output['int']) evaluates to "methodResponse" while using in localhost. I've tried using different expressions to extract out the value, with no success so far. :(
Any help? Thanks a lot.

10-18-2008, 05:03 PM
did you try output.methodResponse.params.param.int?

10-18-2008, 06:43 PM
why didn't i try that. thanks! :D

btw, why is there this difference in behaviour?

10-19-2008, 05:31 PM
btw, why is there this difference in behaviour?

perhaps you'll find the answer if you dig deep into xml2array library...i myself am mystified why output.methodResponse.params.param.int works and not output.methodResponse.params.param.value.int since the int node is a child of the value node...the answer may lie in the documentation...but, i'm too lazy to look :/