find textnodes that arent nested in a child node

KATheartstrade

New Member
I have the following xml:\[code\]<p> <tx> <ts> <mtr> <pos> <Part>Text1</Part> </pos> </mtr> Text2<hyph/>Text3 </ts> </tx></p><p> <tx> <ts> Text4 </ts> </tx></p>\[/code\]So basically I have a series of p/tx/ts with ts sometimes having optional child nodes.Now I need to find all textnodes directly below p/tx/ts but not those textnodes that are nested in a child of ts.In the example above i need text2,text3 and text4 but not text1 (because it is nested in mtr/pos/part i.e a subnode of ts)
 
Back
Top