I would like to extract all text from subnodes of a specific document, AND return a text array. I think it would be easier to show it in an example:
given document:
<root>
<div>
some text
<p>some other text</p>
</div>
<div>
another text
<b>yet another text <em>even more</em></b>
end of text
</div>
</root>
I would like to construct an expression which returns TWO elements:
[0] some text someother text
[1] another text yet another text even more end of text
I have tried many expressions but i seem to be missing something here, it is easy to extract div's alone (just //div) but how to group them and join all text() subnodes in every div separately?