> Just wondering though, with regards to Tim's solution, how can you
> make it remove the XML tags, and select specific nodes?

Every node in the XML is converted to a Hash with the properties
'attributes', 'children' and 'tag'.
To select the second child of the root node, you would do `var node =
gRoot.children[1]`.

Another option is `var tree = hashToElement(gRoot)`, after which you
can access all elements like a normal DOM,
`tree.getChildren('gallery')` would then get you your gallery
elements, for example.

With regards to removing the XML tags, I just thought of a different
solution, which is pretty much an altered version of kamicane's
XML.hashToElement function. It's not the most clean thing, and perhaps
could do better with some sort of mapping function, instead of the
switch statement, but it works:
http://mootools.net/shell/timwienk/Hq8xm/2/

-- Tim

Reply via email to