Get a string sequence from a node-set in xpath 1.0
- by Miguel
I'm using xpath 1.0 to parse an html file and I want to get a string sequence from a node-set. First I select a node-set (eg: //div) and then I want the string-value of each node of the set. I've tried with string(//div) but it only returns the string-value of the first node in the set.
Example
<foo>
<div>
bbbb<p>aaa</p>
</div>
<div>
cccc<p>aaa</p>
</div>
</foo>
I expect a result like ('bbbbaaa', 'ccccaaa') but I only get 'bbbaaa'