Greetings, I was recently working on a web application and I needed to collect nodes in an XHR request''s responseXML property. I figured as this object also followed the DOM specification that it would work for the Element.getElementsBySelector function but unfortunately this returned no results. Any ideas? This could definitely be a great leverage for prototype, the XPATH ''standard'' is roughly supported. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Hey Matt, Matt a écrit :> I was recently working on a web application and I needed to > collect nodes in an XHR request''s responseXML property. I figured as > this object also followed the DOM specification that it would work for > the Element.getElementsBySelector function but unfortunately this > returned no results. Any ideas? This could definitely be a greatIt doesn''t work because we extend HTMLElement, not Element (the DOM interface), which does not lend itself to extension at all.> leverage for prototype, the XPATH ''standard'' is roughly supported.I''m not sure about what you mean here by "roughly" ("almost everywhere" or "barely anywhere" ;-)). At any rate, I don''t believe Core would be interested in implementing an extraction layer over *any* DOM, including XML DOM, if only because XML, as a data format for AJAX responses, is dead in the water. Hardly anybody bothers to deal with it on the client side, when formats such as JSON are so much easier, and faster, to deal with. However, if someone wants to come up with a tested add-on, please do! -- Christophe Porteneuve a.k.a. TDD "[They] did not know it was impossible, so they did it." --Mark Twain Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
What about E4X <http://en.wikipedia.org/wiki/E4X>? It is already part of Spider Monkey and Rhino, and supposedly support is coming in an upcoming release of IE. ...I am a JSON fan also, but E4X is something to keep an eye on. On 6/12/07, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote:> > > Hey Matt, > > Matt a écrit : > > I was recently working on a web application and I needed to > > collect nodes in an XHR request''s responseXML property. I figured as > > this object also followed the DOM specification that it would work for > > the Element.getElementsBySelector function but unfortunately this > > returned no results. Any ideas? This could definitely be a great > > It doesn''t work because we extend HTMLElement, not Element (the DOM > interface), which does not lend itself to extension at all. > > > leverage for prototype, the XPATH ''standard'' is roughly supported. > > I''m not sure about what you mean here by "roughly" ("almost everywhere" > or "barely anywhere" ;-)). > > At any rate, I don''t believe Core would be interested in implementing an > extraction layer over *any* DOM, including XML DOM, if only because XML, > as a data format for AJAX responses, is dead in the water. Hardly > anybody bothers to deal with it on the client side, when formats such as > JSON are so much easier, and faster, to deal with. > > However, if someone wants to come up with a tested add-on, please do! > > -- > Christophe Porteneuve a.k.a. TDD > "[They] did not know it was impossible, so they did it." --Mark Twain > Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
for those interested: http://developer.mozilla.org/presentations/xtech2005/e4x/ On 6/13/07, Mark Holton <holtonma-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > What about E4X <http://en.wikipedia.org/wiki/E4X>? It is already part of > Spider Monkey and Rhino, and supposedly support is coming in an upcoming > release of IE. ...I am a JSON fan also, but E4X is something to keep an eye > on. > > > > On 6/12/07, Christophe Porteneuve <tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > > > > > > Hey Matt, > > > > Matt a écrit : > > > I was recently working on a web application and I needed to > > > collect nodes in an XHR request''s responseXML property. I figured as > > > this object also followed the DOM specification that it would work for > > > > > the Element.getElementsBySelector function but unfortunately this > > > returned no results. Any ideas? This could definitely be a great > > > > It doesn''t work because we extend HTMLElement, not Element (the DOM > > interface), which does not lend itself to extension at all. > > > > > leverage for prototype, the XPATH ''standard'' is roughly supported. > > > > I''m not sure about what you mean here by "roughly" ("almost everywhere" > > or "barely anywhere" ;-)). > > > > At any rate, I don''t believe Core would be interested in implementing an > > extraction layer over *any* DOM, including XML DOM, if only because XML, > > as a data format for AJAX responses, is dead in the water. Hardly > > anybody bothers to deal with it on the client side, when formats such as > > JSON are so much easier, and faster, to deal with. > > > > However, if someone wants to come up with a tested add-on, please do! > > > > -- > > Christophe Porteneuve a.k.a. TDD > > "[They] did not know it was impossible, so they did it." --Mark Twain > > Email: tdd-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org > > > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Good point, E4X is another syntax language to learn for selecting a list of elements. Yeah I figured it was to do with the HTMLElement.prototype extensions, although the hack it performs for IE, could that be performed on the XML obj? Anyways I''ll look into this further, customizations are always fun, thanks for the advice. On Jun 13, 4:22 am, "Mark Holton" <holto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> for those interested:http://developer.mozilla.org/presentations/xtech2005/e4x/ > > On 6/13/07, Mark Holton <holto...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > What about E4X <http://en.wikipedia.org/wiki/E4X>? It is already part of > > Spider Monkey and Rhino, and supposedly support is coming in an upcoming > > release of IE. ...I am a JSON fan also, but E4X is something to keep an eye > > on. > > > On 6/12/07, Christophe Porteneuve <t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org> wrote: > > > > Hey Matt, > > > > Matt a écrit : > > > > I was recently working on a web application and I needed to > > > > collect nodes in an XHR request''s responseXML property. I figured as > > > > this object also followed the DOM specification that it would work for > > > > > the Element.getElementsBySelector function but unfortunately this > > > > returned no results. Any ideas? This could definitely be a great > > > > It doesn''t work because we extend HTMLElement, not Element (the DOM > > > interface), which does not lend itself to extension at all. > > > > > leverage for prototype, the XPATH ''standard'' is roughly supported. > > > > I''m not sure about what you mean here by "roughly" ("almost everywhere" > > > or "barely anywhere" ;-)). > > > > At any rate, I don''t believe Core would be interested in implementing an > > > extraction layer over *any* DOM, including XML DOM, if only because XML, > > > as a data format for AJAX responses, is dead in the water. Hardly > > > anybody bothers to deal with it on the client side, when formats such as > > > JSON are so much easier, and faster, to deal with. > > > > However, if someone wants to come up with a tested add-on, please do! > > > > -- > > > Christophe Porteneuve a.k.a. TDD > > > "[They] did not know it was impossible, so they did it." --Mark Twain > > > Email: t...-x+CfDp/qHev2eFz/2MeuCQ@public.gmane.org--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---