childNodes.length IE and FF difference



Hi all,

I got a problem with childNodes.length, I use the following XML for my
guestbook:

<?xml version="1.0" encoding="ISO-8859-1"?>
<guestbook>
<entry>
<from>Q1tum</from>
<mail>kuukelekuu at gmail dot com</mail>
<date>2006-05-16 09:41</date>
<message>First test message</message>
</entry>
<entry>
<from>Q1tum</from>
<mail>kuukelekuu at gmail dot com</mail>
<date>2006-05-17 09:41</date>
<message>Seconde test message</message>
</entry>
</guestbook>

when I use the following script to check I get different output in IE
and FireFox:

var xml = response.responseXML;
var table = document.getElementById('guestbook');

var num = xml.getElementsByTagName('guestbook')[0].childNodes.length;

alert(num);

IE alerts 2
FF alerts 5

Anyone have a idea why that is?

Regards,

Q1tum

.



Relevant Pages

  • Re: childNodes.length IE and FF difference
    ... I got a problem with childNodes.length, I use the following XML for my ... IE alerts 2 ...
    (comp.lang.javascript)
  • Rexml and some rather basic problems
    ... For a new project I want to use a xml parser to extract some information ... How can I filter for an entry and then puts ...
    (comp.lang.ruby)
  • Re: Security Needed!
    ... Can someone direct me to the source of this security script in ... Then on the script that processes the entry, ... Funny, I've had a guestbook on one of my sites, with no protection from ... spam-bot and someone with a big problem. ...
    (alt.php)
  • Re: Where are building blocks stored, please?
    ... that includes the actual entry and teh details you see in the Quick Parts property dialog for the entry. ... The XML did not appear in the custom template. ... The building block recorded is available to Word later, ...
    (microsoft.public.word.docmanagement)
  • Re: MySQL/PHP problem
    ... > I'm using PHP & MySQL to create a simple guestbook. ... > to display the latest entry first though. ... Each time around display the entire entry. ...
    (comp.lang.php)