[Moo] Unable to traverse XML DOM using MooTools

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[Moo] Unable to traverse XML DOM using MooTools

Bryan Garaventa
This has likely come up before, and I've searched on the web for hours to find an answer to this, but nobody seems to know how it can be done, and it's driving me sort of nuts.
 
I have an AJAX request that is pulling XML into the page as a string, which I then convert into an XML document object.
 
I need to be able to get a list of nodes via getElements using a CSS selector such as "groupname > *" or '*[id="whatever"]'
 
However, according to everything I've read on the web, this is impossible to do using MooTools, even though it works fine in jQuery and Dojo.
 
Does anyone know how I can parse an XML document using MooTools in this manner?
 
Thanks,
Bryan

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Unable to traverse XML DOM using MooTools

Sanford Whiteman
Search the archives of this list for my posts that involve XML and you'll get at least a few pointers (I'm on the road so can't find the salient points right now). I can check more tomorrow.

-- Sandy

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Unable to traverse XML DOM using MooTools

Bryan Garaventa
Thanks, the closest I was able to find was at
 
I see a lot of back and forth but little in the way of a definitive solution.
 
For instance, one of the things mentioned was that IE sees the node as HTML Unknown instead of HTML General and that this is why the MooTools methods aren't binding correctly, but I can't find where it says how to fix this.
 
Shouldn't the following statement simply normalize correctly?
 
var myNodes = $(XMLDocument).getElements('group > *');
 
I can verify that I have an instantiated XML DOM object, but an error is thrown every time I try to parse it.
 
----- Original Message -----
Sent: Friday, October 04, 2013 5:01 PM
Subject: Re: [Moo] Unable to traverse XML DOM using MooTools

Search the archives of this list for my posts that involve XML and you'll get at least a few pointers (I'm on the road so can't find the salient points right now). I can check more tomorrow.

-- Sandy

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.

--
 
---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Unable to traverse XML DOM using MooTools

Sanford Whiteman
Check this Fiddle out:

          http://jsfiddle.net/sanford/5YS66/5/show/light/
         
-- S.

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: [Moo] Unable to traverse XML DOM using MooTools

Bryan Garaventa
Awesome! you are brilliant :) Thanks a million.

For those who may need to know this in the future, this is the syntax:

// context = HTML or XML node or document

Array.each(Slick.search(context, selector), function(o, i){
// o is each matching node, XML or HTML
});

 I needed this level of ambiguity for the project I'm working on, which I'll
be happy to share here when complete.

Best wishes,
Bryan

----- Original Message -----
From: "Sanford Whiteman" <[hidden email]>
To: "Bryan Garaventa" <[hidden email]>
Sent: Friday, October 04, 2013 9:11 PM
Subject: Re: [Moo] Unable to traverse XML DOM using MooTools


> Check this Fiddle out:
>
>          http://jsfiddle.net/sanford/5YS66/5/show/light/
>
> -- S.
>
> --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "MooTools Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [hidden email].
> For more options, visit https://groups.google.com/groups/opt_out.

--

---
You received this message because you are subscribed to the Google Groups "MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.