If you're interested in functional programming, you might also want to checkout my second blog which i'm actively working on!!

Friday, March 26, 2010

the beauty of control abstractions in SCALA - part 3

This time i decided to test out SCALA's xml API... again it's pretty impressive how easy it is to save or load xml.

For testing purpose i made modifications to 'FileComponent.scala' and 'TreeComponent.scala'. I added 2 methods:
- toXML
- saveAsXML

TreeComponent.scala



FileComponent.scala


FileComponentTest.scala



Output: d:/tmp/filetree.xml

No comments:

Post a Comment