Created
April 2, 2015 05:49
-
-
Save yutaono/b33bc706657c7b03a09b to your computer and use it in GitHub Desktop.
scala xml memo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val a: Option[String] = Some("msg") | |
a: Option[String] = Some(msg) | |
scala> <msg content={a orNull} /> | |
warning: there was one feature warning; re-run with -feature for details | |
res3: scala.xml.Elem = <msg content="msg"/> | |
scala> val a: Option[String] = None | |
a: Option[String] = None | |
scala> <msg content={a orNull} /> | |
warning: there was one feature warning; re-run with -feature for details | |
res4: scala.xml.Elem = <msg/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment