This page is no longer maintained — Please continue to the home page at

scala.xml.Node attribute method signature consistency

No replies
Lucien Pereira
Joined: 2010-06-05,
User offline. Last seen 42 years 45 weeks ago.


I don't understand scala.xml.Node attribute method signature.

def attribute(uri: String, key: String): Option[Seq[Node]]

scaladoc indicate :
returns value of UnprefixedAttribute with given key in attributes, if it
otherwise null.

So I would expect this method to return an Option[UnprefixedAttribute]
but it
returns an Option[Seq[Node]] instead.

Does someone knows why ?


Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland