blob: 83de7a70203f1ed47c9bf5efcced2498c2d8309b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// $Id$
import scala.xml.Text;
import dtd._;
object Test {
def main( argv:Array[String] ) = {
val link = A(Text("link"));
//val m = new scala.collection.mutable.HashMap[String, String];
//m.put("href","http://lampwww.epfl.ch");
//link.setAttribs(m);
val body = Body(
H1(Text("Welcome to xhtml in scala")),
P(Text( "a paragraph")),
P(Text("another one, with a "),link,Text(" to the LAMP homepage.")));
val page = Html(Head(Title(Text("a basic xhtml page"))), body);
System.out.println( page ) ;
val doc = load(argv(0));
System.out.println( doc );
}
}
|