Er, I forgot a few steps. Since it's an element node, you can get the childNodes, and look for a TextNode, which will have the nodeValue of the text. Kinda sucky, though :)
Some simple investigation suggests that Chrome supports both innerText, and textContent on HTML elements. MooTools checks first for innerText (which is usually IE), and if it doesnt exist, uses textContent. So when MooTools does the initial check on page load, it gets set to look for innerText in Chrome. However, since innerText is only an HTML thing, the XML elements rightfully only have textContent set. On Tue, Dec 21, 2010 at 1:13 AM, Andrea Dessì <[email protected]> wrote: > element.get("nodeValue") and element.nodeValue > are returning null... > > Have you tried the jsFiddle example? > > -- > Andrea Dessì > > > > On Tue, Dec 21, 2010 at 10:09, Sean McArthur <[email protected]>wrote: > >> I'm not really sure, but for XML, the text between the tags should be >> available via `nodeValue`, no? >> >> >> >> >> On Tue, Dec 21, 2010 at 12:47 AM, Andrea Dessì <[email protected]> wrote: >> >>> Hi all, >>> >>> I'm trying to parse a XML object. >>> In this example http://www.jsfiddle.net/tps3z/ >>> the method element.get("text") is working with firefox >>> and not working with google chrome. >>> >>> Why? :) please use your console in order to see the wrong values. >>> >>> What am I missing? >>> -- >>> Andrea >> >> >> >
