/ Published in: Scala
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
object XmlHelpers { val docBuilder = javax.xml.parsers.DocumentBuilderFactory.newInstance().newDocumentBuilder() } n match { // XXX: ns r.setAttribute(a.key, a.value.text) } r.appendChild(c.toJdkNode(doc)) } r // not sure // XXX: other types //case x => throw new Exception(x.getClass.getName) } } doc.appendChild(toJdkNode(doc)) doc } }
URL: https://gist.github.com/167566