On May 15, 8:53 pm, theMuffinMan <[EMAIL PROTECTED]> wrote:
> Thanks guys!
>
> So, should I write like this?
> var name   = node.getElementsByTagName('newslink')
> [0].firstChild.Text;
>
> or:
>
> var name   = node.getElementsByTagName('newslink')
> [0].firstChild.textContent;

I don't use XML this way, for HTML documents I use either JSON or HTML
fragments.  To get the CDATA of an XML node, you need to use the
DOMString attribute of the Text node holds the text that is contained
by the CDATA section:

<URL: http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-667469212 >

There are likely others here who can give you better advice.


--
Rob


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to