I would like to process a document to get a value that can have more than one path. An ideal signature would look something like this:
def value(doc: Elem, potential_paths: List[something]): String
If it just processes the document looking at the head of potential_packages, if it is found, return it, otherwise continue with path_paths.drop (1).
With XPath, “something” will be a simple String list representing XPath statements. Since "\" is actually a NodeSeq function, it does not seem (apparently) representable separately from node. Anyway, what is a scala-shaped way to get closer to this?
source
share