[Lift] Re: Whitespace removal from XML

2009-11-09 Thread Bryan Germann

Also see trimProper in
http://lampsvn.epfl.ch/trac/scala/browser/scala/tags/R_2_7_7_final/src/library/scala/xml/Utility.scala?view=markup

--Bryan

On Mon, Nov 9, 2009 at 5:47 PM, harryh  wrote:
>
> Answering my own question, I wrote this.  I think it should do what I
> want:
>
> def compactXml(node: Node): Node = node match {
>  case Elem(p, l, a, s, children @ _*) => Elem(p, l, a, s, children.map
> (compactXml(_)) :_*)
>  case Text(data) => Text(data.trim)
>  case x => x
> }
>
> -harryh
> >
>

--~--~-~--~~~---~--~~
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---



[Lift] Re: Whitespace removal from XML

2009-11-09 Thread harryh

Answering my own question, I wrote this.  I think it should do what I
want:

def compactXml(node: Node): Node = node match {
  case Elem(p, l, a, s, children @ _*) => Elem(p, l, a, s, children.map
(compactXml(_)) :_*)
  case Text(data) => Text(data.trim)
  case x => x
}

-harryh
--~--~-~--~~~---~--~~
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 
liftweb+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en
-~--~~~~--~~--~--~---