XML/DOM serialization: Difference between revisions
Content added Content deleted
m (Changed over to works with template) |
No edit summary |
||
Line 27: | Line 27: | ||
(On the use of <code><unsafe></code>: The class has not yet been reviewed for E safety, so <code><import:...makeDocumentBuilderFactory></code> is not yet allowed. The review would probably be straightforward.) |
(On the use of <code><unsafe></code>: The class has not yet been reviewed for E safety, so <code><import:...makeDocumentBuilderFactory></code> is not yet allowed. The review would probably be straightforward.) |
||
=={{header|Groovy}}== |
|||
import groovy.xml.MarkupBuilder |
|||
def writer = new StringWriter() << '<?xml version="1.0" ?>\n' |
|||
def xml = new MarkupBuilder(writer) |
|||
xml.root() { |
|||
element('Some text here' ) |
|||
} |
|||
println writer |
|||
=={{header|JavaScript}}== |
=={{header|JavaScript}}== |