Javascript E4X - Return the text of node and its children?
- by Chris
I'm trying to parse some of html where there is are repeating lines of code such as:
<a>This is <span>some text</span> but its <span>not grabbing the span</span> content</a>
So I am looping through the object and extracting this:
object.a[i].text();
but its only returning
"This is but its content"
How do I grab the text within the children nodes as well, all as one string?
Cheers