Thanks for the tip. 
Yes I had already tried that :(

____________________________________________
Matthew Delmarter

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Ólafur Marteinsson
> Sent: Friday, 16 February 2007 3:48 a.m.
> To: discuss@jquery.com
> Subject: Re: [jQuery] getting children using XPath in IE
> 
> 
> What if the elements had some data in it? Maybe it matters? Or you've
> probably tried that as well.
> 
> 
> Matthew Delmarter wrote:
> >
> > Hi Karl,
> >
> > I did try that - just tested it again to make sure.
> >
> > For example:
> >
> > alert( $("/xmlelement").children().length );
> > or
> > alert( $("//xmlelement").children().length );
> >
> > Firefox = 4 in both cases
> > IE7 = 0 in both cases
> >
> > The XML again was:
> >
> >             <xmlelement>
> >                   <subelement1></subelement1>
> >                   <subelement2></subelement2>
> >                   <subelement3></subelement3>
> >                   <subelement4></subelement4>
> >             </xmlelement>
> >
> > ____________________________________________
> > Matthew Delmarter
> > Systems Delivery Manager
> > Database Communications
> > Level 7, 182 Wakefield Street, Wellington 6011
> > Phone: +64-4-381-3093 / Mobile: +64-27-536-5627
> > [EMAIL PROTECTED]
> > www.dbc.co.nz
> >
> >   _____
> >
> > From: Karl Swedberg [mailto:[EMAIL PROTECTED]
> > Sent: Friday, 16 February 2007 2:30 a.m.
> > To: [EMAIL PROTECTED]; jQuery Discussion.
> > Subject: Re: [jQuery] getting children using XPath in IE
> >
> > 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:[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/
> >
> >
> 
> --
> View this message in context: http://www.nabble.com/getting-children-
> using-XPath-in-IE-tf3232079.html#a8986603
> Sent from the JQuery mailing list archive at Nabble.com.
> 
> 
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to