Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


how to access sibling node that do not have children

From: great Fez <thegreatfez@-------.--->
To: NULL
Date: 4/5/2006 12:16:00 AM



Hello,

I'm an xpath newbie and I'm trying to figure out how to return all
sibling nodes or child nodes that do not have children (so only go to
depth = 0 or 1).

I have the following:

<top>
  <one></one>
  <two></two>
  <three></three>
  <alpha1>
     <letter1></letter1>
     <letter2></letter2>
     <beta>
        <lettera></lettera>
        <letterb></letterb>
     </beta>
  </alpha1>
  <alpha2>
     <letter1></letter1>
     <letter2></letter2>
     <beta>
        <lettera></lettera>
        <letterb></letterb>
     </beta>
  </alpha2>
<top>

And I'm trying to retrieve only nodes that have no children:
<one></one>
<two></two>
<three></three>

and for a later call node that only have children:
  <alpha1>
  </alpha1>
  <alpha2>
  <alpha2>

Any help is greatly appreciated.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent