[Lift] Re: Concatenating lists of nodes
A NodeSeq is really just a Seq[Node]. And a List[Node] is also a Seq[Node]. Hence a List[Node] is a NodeSeq. scala import scala.xml.NodeSeq import scala.xml.NodeSeq scala val n: NodeSeq = List(spanA/span, spanB/span, spanC/span) n: scala.xml.NodeSeq = spanA/spanspanB/spanspanC/span --j On Thu, Nov 13, 2008 at 10:14 AM, Charles F. Munat [EMAIL PROTECTED] wrote: If I have a list thus: List(spanA/span,spanB/span,spanC/span) How can a get a NodeSeq thus from this: spanA/spanspanB/spanspanC/span I'm sure this is drop-dead simple, but it's still not obvious to me... Thanks, Chas. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Concatenating lists of nodes
Sigh... I knew it had to be drop-dead simple. Not sure how I kept getting List(span...) output instead of span.../span out. Works now. Thanks. Chas. Jorge Ortiz wrote: A NodeSeq is really just a Seq[Node]. And a List[Node] is also a Seq[Node]. Hence a List[Node] is a NodeSeq. scala import scala.xml.NodeSeq import scala.xml.NodeSeq scala val n: NodeSeq = List(spanA/span, spanB/span, spanC/span) n: scala.xml.NodeSeq = spanA/spanspanB/spanspanC/span --j On Thu, Nov 13, 2008 at 10:14 AM, Charles F. Munat [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: If I have a list thus: List(spanA/span,spanB/span,spanC/span) How can a get a NodeSeq thus from this: spanA/spanspanB/spanspanC/span I'm sure this is drop-dead simple, but it's still not obvious to me... Thanks, Chas. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---
[Lift] Re: Concatenating lists of nodes
On Thu, Nov 13, 2008 at 10:32 AM, Matt Harrington [EMAIL PROTECTED] wrote: Take a look at List.mkString(). It inherits from Iterable. ---Matt Erm, I'll retract this. :) ---Matt --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Lift group. To post to this group, send email to liftweb@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~--~~~~--~~--~--~---