I have the following XML sitting in a var called RoomPriceInfo in javascript:
<?xml version="1.0" encoding="UTF-8"?>
<BkgItemHotelRoomPrices CurrCode="EUR">
<RoomType Code="DB" Count="1" Desc="Double" Age="0">
<PriceInfo EndDate="2011-12-17" AgentMarkup="0.0" MarkupPerc="0.1075" FitRdg="0.25" MarkupPrice="48.73" AgentPrice="48.75" StartDate="2011-12-11" Nights="7" FitRdgPrice="48.75" CurrDec="2" CurrDecPrice="48.75" SuppPrice="44.0"/>
</RoomType>
</BkgItemHotelRoomPrices>
and the following code:
DBRoomPrice = RoomPriceInfo.doXPath("//RoomType[@Code='DB']");
alert(DBRoomPrice[0].children.length);
Under FF7 on Ubuntu and FF8 on WinXP I get an alert of 1 which is correct. However under IE8 on WinXP and IE9 on Windows 7 nothing happens. It just dies silently.
Please can anyone shed any light on this? If I do a getElementById
on the DOM object and then ask for children on that, then IE8 & IE9 behave correctly.