Re: [xml] query - append DOM tree, identify leaf node
- From: Lars Oppermann <Lars Oppermann Sun COM>
- To: xml gnome org
- Cc: Senthil Nathan <rsennat gmail com>
- Subject: Re: [xml] query - append DOM tree, identify leaf node
- Date: Thu, 23 Aug 2007 14:41:51 +0200
Lars Oppermann wrote:
With leaf node I assume you mean an element node that has only text or
attribute children but no other element children. A way of doing this in
XPath is like this:
//*[count(./*)=0]
Which of course is equivalent to
//*[count(*)=0]
As I realized shortly after pressing the send button ;)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]