[jQuery] Re: Parsing XML using "find()" has stopped working in jQuery 1.3+

2009-07-15 Thread skube
Although, I still think there is a BUG outstanding in 1.3.2. Using the slightly more complicated find() below with 1.2.6 works in both IE and Firefox: $(xmlInitial).find("item:has(year:contains('2009')), item:has (name:contains('2'))").each(function(){ alert($(this).children('name').text());

[jQuery] Re: Parsing XML using "find()" has stopped working in jQuery 1.3+

2009-07-15 Thread skube
FYI, This appears to be a :contains() issue and is actually an older bug which has resurfaced again with the introduction of jQuery 1.3.2 Older groups message: http://groups.google.com/group/jquery-en/browse_thread/thread/f5c36c05cfa43e9a/90e3dfd019086772?#90e3dfd019086772 Bugtracker: http://dev

[jQuery] Re: Parsing XML and appending to an array?

2009-05-07 Thread chris thatcher
i think what you want is $('image', responsexml).each() otherwise you are asking for each response element of which there is only one. On Thu, May 7, 2009 at 4:47 PM, Alan at DSI wrote: > > I'm new to jQuery and what I am trying to do is take the XML response > below and obtain the src attribut

[jQuery] Re: Parsing XML with IE?

2009-05-07 Thread ScottChiefBaker
Wow that's sure is a unique bug. I was able to fix my script on the server side by make sure the XML content was served as text/xml, this caused an XMLObject to be returned which IE was able to process just fine. Thanks for the heads up! On May 7, 1:52 pm, Balazs Endresz wrote: > It's explained

[jQuery] Re: Parsing XML with IE?

2009-05-07 Thread Balazs Endresz
It's explained here: http://groups.google.com/group/jquery-en/browse_frm/thread/95718c9aab2c7483/af37adcb54b816c3?lnk=gst&q=parsexml&pli=1 On May 7, 10:24 pm, ScottChiefBaker wrote: > I created a simple test case: > > http://www.perturb.org/tmp/jquery-test.html > > On May 7, 12:41 pm, ScottChief

[jQuery] Re: Parsing XML with IE?

2009-05-07 Thread ScottChiefBaker
I created a simple test case: http://www.perturb.org/tmp/jquery-test.html On May 7, 12:41 pm, ScottChiefBaker wrote: > The following example works great in Firefox, and Chrome but fails > miserably in IE (6,7,8). I'm running JQuery 1.3.2 if it makes a > difference: > > $('resp',"value").text();

[jQuery] Re: parsing xml

2009-01-02 Thread Balazs Endresz
jQuery can't really parse xml, only html. But browsers can: http://www.w3schools.com/Xml/xml_parser.asp On Jan 2, 5:22 am, jhm wrote: > > jQuery needs a context for find() to work. > > That worked thanks! The xml file I was really using actually had a > context similar. But it also had a header

[jQuery] Re: parsing xml

2009-01-01 Thread jhm
> jQuery needs a context for find() to work. That worked thanks! The xml file I was really using actually had a context similar. But it also had a header that was causing the problem. It was: Any idea why this would break it? Thanks!

[jQuery] Re: parsing xml

2009-01-01 Thread Ricardo Tomasi
Try using a base element: sample one sample two jQuery needs a context for find() to work. On Jan 1, 6:22 pm, jhm wrote: > I'm new to jquery and I'm trying to do a simple xml parse. > > When I use the .each() to get the tags, if there is more than one tag > in the file, no

[jQuery] Re: Parsing XML using jQuery

2008-07-12 Thread Diego A.
Hi there, This plugin might be useful: XML to JSON plugin v1.0 http://www.fyneworks.com/jquery/xml-to-json/ Cheers, Diego A. 2008/7/9 Wallonman <[EMAIL PROTECTED]>: > > It seems that the DOM parsed 'on the fly' isn't ready for querying. > > When doing something weird like: > > var xml = $('Hel

[jQuery] Re: Parsing XML using jQuery

2008-07-09 Thread Wallonman
It seems that the DOM parsed 'on the fly' isn't ready for querying. When doing something weird like: var xml = $('Hello World!Bye World!'); $(xml).appendTo("body"); then the alert($("p").text()); // without context works !

[jQuery] Re: Parsing XML using jQuery

2008-07-09 Thread Alexandre Plennevaux
On Wed, Jul 9, 2008 at 12:38 PM, Wallonman <[EMAIL PROTECTED]> wrote: > > Hi, > > Some hours that I don't understand why this basic Xml parsing with > JQuery doesn't work: > >$(document).ready(function() { > >var xml = '>Hello World!'; > >alert($("p", xm

[jQuery] Re: Parsing XML using jQuery

2008-01-29 Thread Dave Stewart
Thanks David and Tim, I didn't know that. Very useful.

[jQuery] Re: Parsing XML using jQuery

2008-01-29 Thread Timothee Groleau
On Mon, 2008-01-28 at 17:39 -0800, Dave Stewart wrote: > Not sure if this is the best reply, but in order to access the > structure, it has to be part of the DOM, That is not correct. You can build a jQuery instance from a xml object and use the various jQuery query options to search through the

[jQuery] Re: Parsing XML using jQuery

2008-01-28 Thread Alexandre Plennevaux
the first try will not work with latest jquery, as xpath is now into a seperate plugin. So stick to your second try. Also, make sure you search your xml when the xml is actually loaded, so in the ajax function callback $.ajax({//your params here}, function(xml,status){ if(status=='success'){ $('bu

[jQuery] Re: Parsing XML using jQuery

2008-01-28 Thread David Serduke
Actually if it doesn't have to be part of the DOM assuming you are passing in a context as the second parameter of $() which the original author is. I don't use the xpath plugin so I'm not sure about that but the second attempt you said failed worked for me. I got 3 alert boxes with '1', '2', '3

[jQuery] Re: Parsing XML using jQuery

2008-01-28 Thread Dave Stewart
Not sure if this is the best reply, but in order to access the structure, it has to be part of the DOM, so best to inject in into a placeholder first: $('#placeholder).html(xml) // probably need to kill the xml declaration first Then you can use jQuery to traverse the tree. :D

[jQuery] Re: parsing xml

2007-07-17 Thread quez
Thanks for your help. This works but I kinda brute-forced my way though. I'll see if I can implement it more clearly with this. Thanks. On Jul 15, 1:57 pm, "Benjamin Sterling" <[EMAIL PROTECTED]> wrote: > Try: > $('bio', this).text(); > > On 7/15/07, quez <[EMAIL PROTECTED]> wrote: > > > > > > >

[jQuery] Re: parsing xml

2007-07-15 Thread Benjamin Sterling
Try: $('bio', this).text(); On 7/15/07, quez <[EMAIL PROTECTED]> wrote: Benjamin, thanks for your reply. I've started with the $.post func though like this: $.post("/ backend.php",{},function(xml){update_view(xml); } ); then: update_view(xml){ var messages = [] ; $('message', xml).each( fun

[jQuery] Re: parsing xml

2007-07-15 Thread quez
Benjamin, thanks for your reply. I've started with the $.post func though like this: $.post("/ backend.php",{},function(xml){update_view(xml); } ); then: update_view(xml){ var messages = [] ; $('message', xml).each( function(i){ //go through each message $this = $(this); //jquery object. messa

[jQuery] Re: parsing xml

2007-07-15 Thread Benjamin Sterling
quez, I use the $.ajax with dataType set to xml; on success I set a global variable to the contents of the xml. Once it is done, I get the info doing something like: $('response/message:eq(0)/bio', globalXML).text(); :eq(0) will grab the first message :eq(1) will grab the second one and so on.

[jQuery] Re: parsing xml

2007-05-21 Thread gendruwo
Thanks, now im trying to do a search, like for example $search = "Address"; from above xml format how can i use the provided function in jquery to do the searching? i tried using $("Field").find($search); but doesnt seems to work... can someone enlighten me? On May 17, 10:10 pm, Marc Jansen <[EM

[jQuery] Re: parsing xml

2007-05-17 Thread Marc Jansen
gendruwo schrieb: All, if i have an xml file like this and i wanted to extract out the value for each name in the field, how can i do it? $("Field").attr(value) Hi, supposing you get the XML via a POST-Request you could do it like