Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   Re: XPath for non-empty #text nodes (tDOM) (http://www.velocityreviews.com/forums/t604781-re-xpath-for-non-empty-text-nodes-tdom.html)

Richard Tobin 04-09-2008 08:55 PM

Re: XPath for non-empty #text nodes (tDOM)
 
In article <44qdncuBAoFht2DanZ2dnUVZ_s-pnZ2d@speakeasy.net>,
Mikhail Teterin <usenet+mill@aldan.algebra.com> wrote:

>What's would be the syntax for a query, which would allow me to get only the
>elements with non-empty text-nodes?


Presumably you mean direct text children (rather than descendants),
and by "non-empty" you mean "containing something other than whitespace".

If so, try

*[normalize-space(text()) != ""]

(or with // at the start, depending on the context).

-- Richard
--
:wq


All times are GMT. The time now is 06:01 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.