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

[scala-bts] #1787: Computed attribute value in the xml literal requires explicit call to the toString() method.

No replies
Scala 2
Joined: 2009-03-05,
User offline. Last seen 42 years 45 weeks ago.

toString() method.
Reporter: lifecoder | Owner: scala-xml_team
Type: defect | Status: new
Priority: normal | Component: XML support
Keywords: |
It looks inconsistent when values inside the xml elements are implicitly
converted to string but values in the xml attributes are not.

scala> {2+2}

res2: scala.xml.Elem = 4


:5: error: overloaded method constructor UnprefixedAttribute
with alternatives


cannot be applied to (java.lang.String,Int,scala.xml.MetaData)



res4: scala.xml.Elem =


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