Re: [xml] query - append DOM tree, identify leaf node
- From: Rush Manbert <rush manbert com>
- To: Lars Oppermann <Lars Oppermann Sun COM>
- Cc: xml gnome org, Senthil Nathan <rsennat gmail com>
- Subject: Re: [xml] query - append DOM tree, identify leaf node
- Date: Thu, 23 Aug 2007 08:26:39 -0700
Lars Oppermann wrote:
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 ;)
Senthil,
It sounds like you've been doing a lot of reading. All I have to add
here is a couple of URLs that might help to better understand the
intricacies of XPath.
First: http://www.zvon.org/ which has really good interactive tutorials
on XML, XSLT, XPATH, etc.
Second: http://www.w3schools.com/xpath/ I like these too, and there are
many more subjects available.
Best regards,
Rush
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]