Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import scala.xml.Elem
- def takeOneNameInOrder(xml: Elem, names: List[String]) = {
- val found = xml \\ "name" map (_.text) filter (names contains _)
- names filter (found contains _) head
- }
Advertisement
Add Comment
Please, Sign In to add comment