Scala - transform a XML literal into a string without newlines

wewVabyDefe

New Member
For more clarification in a XML structure I will write every tag in a single line. Unfortunately the result contains (after transforming to text) more than one line, so the assertion failed. I need the whole result as a single line without newlines\[code\]val row = <row> <fromSubsystem>02</fromSubsystem> <toSubsystem>01</toSubsystem> <action>E013</action> <comment>return to customer</comment> </row>println("==> " + row.text) assert(row.text == "0201E013return to customer") ==> 02 01 E013 return to customerException in thread "main" java.lang.AssertionError: assertion failed at scala.Predef$.assert(Predef.scala:146)\[/code\]Thanks in advance for an elegant solution!Pongo
 
Back
Top