Thanks in advance for any possible advice.How do I go UP the tree from my subclause-text node (I promise I didn't name an element text), until I get to the ancestor that HAS a code, and DOESN'T have display-inline="yes-display-inline", and get ALL the child "enum"s inclusive? All the ancestor elements on the way also do NOT have either a header or text child, but do have an enum. (YES, there is an XML example).Background:I have nested XML input with section/subsection/paragraph/subparagraph/clause(each of which can also have an enum, header, text child) which gets flattened to output a section full of "p"s with a different style for what used to be sublevels, where the "enum", "header", "text" all get put into the "p". Where I am having trouble is that in some cases, like my sample below, there is ONLY an enum for one or more levels. The output paragraph is supposed to get the code attr(transformed to style) of the FIRST level without "header" or "text", and all the "enum"s between that and the level that HAS the "text", which is where the "p" wrapper gets output, so that the flattening takes place appropriately. To put it in English, I need a (p style="P20")(e)(1)(A). Nested XML Input:\[code\]<section code="P72"><enum>101.</enum><header>SECTION TITLE.</header><subsection code="P20"><enum>(e)</enum><paragraph display-inline="yes-display-inline"><enum>(1)</enum><subparagraph display-inline="yes-display-inline"><enum>(A)</enum><text>If the ... may