Scala loading XML files
I worked through the XML example in the scala intro pages,
at http://scala.epfl.ch/intro/xml.html .
I ran scala teamtest > ttout.xml
and then the following code can load that xml file:
/*
* Try "load"ing one of these babies.
* scalac teamload.scala teamlist.scala
* scala teamload
*/
import teamlist._ ; // import generated definitions
import scala.xml.Text ; // for creating PCDATA nodes
object teamload with Application {
val fn = "ttout.xml" ;
val top = teamlist.load( fn );
Console.println( "Original, from " + fn );
Console.println( top );
}
Next up: experiments with the regular expression patterns described here:
http://scala.epfl.ch/intro/regexppat.html
Of the recent additions to the language, those strike me
(without any experience yet) as the weirdest new feature.
12:31:52 AM