xpath to select text nodes and <br>

M

Marek

Hello,

I need to select all descendant text nodes and br elements using a
xpath query. So this xml:

<a>
<b>text a</b> text b<br />
<c>text c</c> text d<br />
</a>

results in this node list:

1. text a
2. text b
3. <br>
4. text c
5. text d
6. <br>

I tried a/descendant::*[text() or self::br] but that got me some weird
results.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top