We were running into a similar problem with an AJAX application and here is
what we did to get around namespaces:

jQuery(entries).find("[...@nodename=namespace:elementName]");

cheers

Michael Lawson
Content Tools Developer, Global Solutions, ibm.com
Phone:  1-828-355-5544
E-mail:  mjlaw...@us.ibm.com

'Examine my teachings critically, as a gold assayer would test gold. If you
find they make sense, conform to your experience, and don't harm yourself
or others, only then should you accept them.'


                                                                       
  From:       Martijn Houtman <martijn.hout...@gmail.com>              
                                                                       
  To:         jquery-en@googlegroups.com                               
                                                                       
  Date:       03/18/2009 01:06 PM                                      
                                                                       
  Subject:    [jQuery] Re: namespaces XML parsing                      
                                                                       






On Mar 18, 2009, at 5:52 PM, David wrote:

      For example, in FF, if a look for a tag, I have to write "ns
      \\:tag" ,.
      but if a look for an attribute I have to write "ns:attribute". In
      google Chrome (WebKit), I have to write "tag" or "attribute" and it
      works.

      Has this problem been solved, or is there any plugin to deal with
      it?.
      It is veri tedious to code a parsing case for each browser (IE, FF,
      Webkit, etc..)



AFAIK, this problem has not been solved yet, jQuery does not handle
namespaces at all. The ns\\:field is more of a hack and does not work in IE
when parsing to XML (through the AJAX option dataType: "xml").

What you might want to try is removing the dataType option (so that it is
passed as a string), then replace the : character with something else (e.g.
a dash). This way the XML parser will leave the namespaces alone.

Please note that I have not tried this, it's based on the things I have
read about it.

Regards,
--
Martijn.

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

Reply via email to