I afraid we are back to my original question.
I do exactly what you mention below.
However that only work in some browsers but not FF3 and IE6.
And you are telling me that "namespace are not really supported".
I wish to know if I can use jQuery to work on XML file (with
namespace) for all major browsers.
~ sglai
2008/9/22 Jörn Zaefferer <[EMAIL PROTECTED]>:
> Afaik you can select namespaced elements by ommiting the namespace.
> Eg. to select bla:blu, you just select "blu". Of course that gets you
> into trouble when the element name isn't unique (the point of
> namespaces).
>
> I haven't worked with namespaced XML for a long time, so I recommend
> to confirm that somewhere...
>
> Jörn
>
> On Sun, Sep 21, 2008 at 6:40 PM, sui-sing Lai <[EMAIL PROTECTED]> wrote:
>>
>> if that is the case, may I know how do you guys dealing with XML file?
>> I believe most of the XML files (e.g. REST) are with namesapce.
>>
>> ~ sglai
>>
>> 2008/9/21 Jörn Zaefferer <[EMAIL PROTECTED]>:
>>> XML namespaces are not really supported due to various browser issues
>>> that make it nearly impossible to consistently implement selectors
>>> with namespace support. Impossible in the sense that it isn't really
>>> worth it.
>>>
>>> Jörn
>>>
>>> On Sun, Sep 21, 2008 at 4:53 PM, sui-sing Lai <[EMAIL PROTECTED]> wrote:
>>>>
>>>> After further "try and error" on this issue, I found it got something
>>>> to do with the "name space" used in XML.
>>>> After I removed the name space from XML file, the problem go away.
>>>> Of course, I will need the name space eventually.
>>>>
>>>> Before I remove the name space ....
>>>> I notice from the discussion archive that older version of jQuery does
>>>> not support name space.
>>>> So, I updated my jQuery from 1.2.3 to latest version 1.2.6 .... and
>>>> something interesting thing happen:
>>>> I "believe", I see the first load of my page after changing to 1.2.6,
>>>> the problem gone.
>>>> However, subsequent load of the page the problem come back again.
>>>> Um... I don't really understand this.
>>>>
>>>> Thanks,
>>>> sglai
>>>>
>>>> 2008/9/21 Jörn Zaefferer <[EMAIL PROTECTED]>:
>>>>> Is the correct content-type set for the response? If not, setting
>>>>> dataType: "xml" could help.
>>>>>
>>>>> Otherwise, what does the response contain?
>>>>>
>>>>> Jörn
>>>>>
>>>>> On Sun, Sep 21, 2008 at 7:39 AM, sglai <[EMAIL PROTECTED]> wrote:
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> Following simple code does not work on my Firefox 3 and IE (Firefox 2
>>>>>> and Safari are fine).
>>>>>>
>>>>>> $.ajax({
>>>>>> type:"GET",
>>>>>> url:"file.xml",
>>>>>> async:false,
>>>>>> success:function(xml){
>>>>>> $("tag_in_file", xml).each(function(i){
>>>>>> // do something;
>>>>>> });
>>>>>> },
>>>>>> dataType:"xml",
>>>>>> });
>>>>>>
>>>>>>
>>>>>> I can see the success handler is call but when it comes to $
>>>>>> ("tag_in_file", xml), it does not find it !?
>>>>>>
>>>>>> Thanks,
>>>>>> sglai
>>>>>>
>>>>>> >
>>>>>>
>>>>>
>>>>> >
>>>>>
>>>>
>>>> >
>>>>
>>>
>>> >
>>>
>>
>> >
>>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---