I'd like to process a document to retrieve a value that could have more than one path. The ideal signature would look something like:
def value(doc: Elem, potential_paths: List[something]): String
Where it would simply process the doc looking at the head of the potential_paths, if found, return it, otherwise continue with potential_paths.drop(1).
With XPath, the "something" would be a simple list of String's representing XPath statements. Since the "\" is actually a function of the NodeSeq, it's not (apparently) representable separate from a node. Anyway, what's the scala-ish way to approach this?