Consider this code:
import scala.xml.{Node,HasKeyValue}
def domatch(x:Node): Node = {
val hasBar = new HasKeyValue("bar")
x match {
case Node("foo", hasBar(z), _*) => z
case _ => null
}
}
When compiling it, I receive the following warning:
error: class HasKeyValue in package xml is deprecated:
Use UnprefixedAttribute's extractor
How should the code look like?
1 Answer