On Wed, 2006-09-06 at 09:23 -0700, Paul Tomsic wrote:
> what would be the proper xpath to retrieve all nodes
> that contain a text node?
> 
> for instance:  given the following xml:
> 
> <foo><bar/><bar>alpha</bar><bar>beta</bar></foo>
> 
> how would i get the bar's that contain some text?
> 
> thanks

I haven't tried this myself, but I think you could use something like:
foo/bar[self!=""]
or:
foo/bar[.!=""]
This is just what came to my mind, I don't guarantee it will work.

Joona Palaste


Reply via email to