Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Retrieving the path from root of an Element

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Michael Kay <mike AT saxonica.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Retrieving the path from root of an Element
  • Date: Wed, 11 Jul 2012 12:51:44 +0100


On 11/07/2012 12:34, Benoît Thiébault wrote:
I would have prefered that function to be included in XOM... Isn't there
another way?

Yes, there is another way. Use the XPath 2.0 expression

string-join(ancestor-or-self::*/name(), '/')

(You can run XPath 2.0 against XOM by using Saxon as your XPath engine).

Michael Kay
Saxonica




Archive powered by MHonArc 2.6.24.

Top of Page