uhmm...
ok so we have to find the TextNode and retrieve the textContent...

--
Andrea


On Tue, Dec 21, 2010 at 10:22, Sean McArthur <sean.mons...@gmail.com> wrote:

> 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ì <nkj...@gmail.com> 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 <sean.mons...@gmail.com>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ì <nkj...@gmail.com> 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
>>>
>>>
>>>
>>
>

Reply via email to