[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Deepest element in the tree
On 24.08.2016 21:46, Rick Quatro rick@xxxxxxxxxxxxxx wrote:
I am trying to find the deepest, last element in an xml file. When I use this xpath 1.0 statement: You can select (//*[not(*)])[last()] to find the last leaf element not having any children (which in your sample would be the <p>4</p> element). Does that suffice? Or do you want to count the ancestor nodes and determine elements with most ancestors?
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|