 <pre><code>scala&gt; val s = "&lt;myapp&gt;&lt;username&gt;bill&lt;/username&gt;&lt;password&gt;secret123&lt;/password&gt;&lt;background&gt;#FFFFFF&lt;/background&gt;&lt;/myapp&gt;" s: java.lang.String = &lt;myapp&gt;&lt;username&gt;bill&lt;/username&gt;&lt;password&gt;secret123&lt;/password&gt;&lt;background&gt;#FFFFFF&lt;/background&gt;&lt;/myapp&gt; scala&gt; val e = xml.XML.loadString(s) e: scala.xml.Elem = &lt;myapp&gt;&lt;username&gt;bill&lt;/username&gt;&lt;password&gt;secret123&lt;/password&gt;&lt;background&gt;#FFFFFF&lt;/background&gt;&lt;/myapp&gt; scala&gt; val sp = new sys.SystemProperties sp: scala.sys.SystemProperties = Map(env.emacs -&gt; "", java.runtime.name -&gt; Java(TM) SE Runtime Environment, ....) scala&gt; sp ++= e.child.map(n =&gt; (e.label + "." + n.label, n.text)) res11: sp.type = Map(env.emacs -&gt; "", java.runtime.name -&gt; Java(TM) SE Runtime Environment, ...) </code></pre> <p>Sanity check:</p> <pre><code>scala&gt; val p = java.lang.System.getProperties p: java.util.Properties = {env.emacs=, java.runtime.name=Java(TM) SE Runtime Environment,...} scala&gt; import collection.JavaConversions._ import collection.JavaConversions._ scala&gt; p filter { case (k, v) =&gt; k.startsWith("myapp") } \ foreach { case (k,v) =&gt; println(k + "=" + v) } myapp.password=secret123 myapp.background=#FFFFFF myapp.username=bill </code></pre>