Hi Matthew,
Not sure, haven't tried this, but the problem might be that you have
two slashes before xmlelement. Is <xmlelement> the document root? If
so, try it with only one beginning slash:
$("/xmlelement")
--Karl
_________________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Feb 15, 2007, at 8:21 AM, Matthew Delmarter wrote:
Maybe this is just not possible in jQuery yet? I find it strange
how it works fine in Firefox, but not IE7 though.
Am I iterating incorrectly? Is there another method I should be
using? I have tried a number of different methods but simply cannot
get IE to give me a list of child nodes that I can iterate thru.
Any help appreciated … I am about to give up on Xpath in jQuery
otherwise.
Regards,
Matthew
From: [EMAIL PROTECTED] [mailto:discuss-
[EMAIL PROTECTED] On Behalf Of Matthew Delmarter
Sent: Thursday, 15 February 2007 6:51 p.m.
To: jQuery Discussion.
Subject: [jQuery] getting children using XPath in IE
Hi all,
I am getting quite confused here with trying to use XML/Xpath in IE.
Let’s imagine that I have the following XML in my page:
<xmlelement>
<subelement1></subelement1>
<subelement2></subelement2>
<subelement3></subelement3>
<subelement4></subelement4>
</xmlelement>
How do I traverse through all the children of “xmlelement”?
In Firefox this works fine:
$("//xmlelement").children().each(function(e)
{
alert("hi")
})
In Internet Explorer (I am using ver 7) I get nothing at all.
Any clues much appreciated…
____________________________________________
Matthew Delmarter
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/