Hi Mark,
Scales works very nicely with TrAX, so the standard approach works here too:
import scales.xml._
import ScalesXml._
val elem = Elem("trax"l)
val doc = Doc(<(elem) /( <(elem) ~> "value" ))
import javax.xml.transform._
val trax = TransformerFactory.
newInstance.newTransformer
// pretty printing
trax.setOutputProperty(OutputKeys.INDENT, "yes")
trax.setOutputProperty("{
http://xml.apache.org/xslt}indent-amount", "2")
val wr = new java.io.StringWriter()
val str = new stream.StreamResult(wr)
trax.transform(doc, str)
println(wr.toString)
its possible on a non apache dom that other properties must be used.
For jdk7 the above runs directly via StAX and doesn't need
intermediate conversions, on 1.6 it however does.
Cheers,
Chris
> --
> You received this message because you are subscribed to the Google Groups
> "scales-xml" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to
scales-xml+...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>