XML : Why does not the <{tag}> scala.xml syntax work?

  val tag="foo"    //works  val xml= <elem kind={tag}>some text</elem>    //does not work  val xml= <{tag}>some text</{tag}>    

I want to create an xml element of a tag name that is not known in advance. How can I do this? Creating an element with the xml.Elem constructor is very complicated.

No comments:

Post a Comment