Finding a Same-Level Predecessor in XML using XPath

jesseoabell

New Member
I have an XML Document I am attempting to get some data from. I have a known quantity, and on the same level and unknown quantity. So the format looks like this:\[code\]<header>Unknown Item</header><title>Known Item</title>\[/code\]This is the very simplified version. Now I may have any number of this format in succession, but what I want to be able to do is given the known item, which gives me the ability to navigate to that node, use a built-in way to get the nearest same-level predecessor. Each pair of known and unknown items are tied together in the domain space, but not in the XML.If it's relevant, this is being done in Scala using Saxon as my parser, working over cleaned HTML. It seems to be that this is a fairly abstract problem, however.
 
Back
Top