Skip to content

Commit 1916198

Browse files
author
mdodsworth
committed
more
1 parent cd60e56 commit 1916198

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

xml-test.scala

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import scala.xml._
2+
3+
val xmlTree =
4+
<html>
5+
<title>this is a test</title>
6+
</html>
7+
<body>
8+
<h1> this is a heading 1</h1>
9+
<h2/>
10+
<list>
11+
<element>this is a test</element>
12+
<element>this is another test</element>
13+
<element>this is a third test</element>
14+
</list>
15+
</body>;
16+
17+
println("title = "+ (xmlTree \ "title").text)
18+
println("elements = "+ (xmlTree \ "list"))

0 commit comments

Comments
 (0)