Well, if XML is coming from a server it should already be XML -
especially if you're getting it from an $.ajax() request (or the
like). That is definitely the preferable way to get XML from a server.

--John



On Wed, Dec 16, 2009 at 9:58 PM, John Arrowwood <jarro...@gmail.com> wrote:
> Well, technically, I'm pulling the XML from a server, and then using
> document.createElement() to create the 'state' and 'foo' tags.  But I tried
> to simplify the situation to the minimum.
>
> Should I be using a different technique to create the XML tags/nodes, and
> would that solve my problem?
>
> On Wed, Dec 16, 2009 at 3:57 PM, John Resig <jere...@gmail.com> wrote:
>>
>> I'm curious to hear if this has been resolved in jQuery 1.4a1, it may be.
>> http://code.jquery.com/jquery-nightly.js
>>
>> I should note that in your case you're not actually creating an XML
>> fragment - you're creating a bunch of unknown HTML elements.
>>
>> --John
>>
>>
>>
>> On Wed, Dec 16, 2009 at 3:02 PM, jarrowwx <jarro...@gmail.com> wrote:
>> > I have a snippet of XML.
>> >
>> > var xml = $('<card><state><foo>1</foo></state></card>')[0];
>> >
>> > On Safari, this works:
>> >  console.log( $(xml).find('card foo').text() ); // prints '1'
>> >
>> > On FireFox, it does not (returns empty string),
>> > but this works:
>> >  console.log( $(xml).find('card').find('foo').text() ); // prints '1'
>> >
>> > I've worked around it.  But it looks like it may be a jQuery bug.
>> >
>> > --
>> >
>> > You received this message because you are subscribed to the Google
>> > Groups "jQuery Development" group.
>> > To post to this group, send email to jquery-...@googlegroups.com.
>> > To unsubscribe from this group, send email to
>> > jquery-dev+unsubscr...@googlegroups.com.
>> > For more options, visit this group at
>> > http://groups.google.com/group/jquery-dev?hl=en.
>> >
>> >
>> >
>>
>> --
>>
>> You received this message because you are subscribed to the Google Groups
>> "jQuery Development" group.
>> To post to this group, send email to jquery-...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> jquery-dev+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/jquery-dev?hl=en.
>>
>>
>
>
>
> --
> John Arrowwood
> John (at) Irie (dash) Inc (dot) com
> John (at) Arrowwood Photography (dot) com
> John (at) Hanlons Razor (dot) com
> --
> http://arrowwood.blogspot.com
> Pablo Picasso  - "Computers are useless. They can only give you answers."
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "jQuery Development" group.
> To post to this group, send email to jquery-...@googlegroups.com.
> To unsubscribe from this group, send email to
> jquery-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/jquery-dev?hl=en.
>

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to