logo       

Re: Re: Missing StreamingMarkupBuilder: msg#00121

lang.groovy.user

Subject: Re: Re: Missing StreamingMarkupBuilder


On 21 Nov 2004, at 18:50, Sean Radford wrote:

I note that someone else has asked this before, but I can't see an answer.

From beta-6 to beta-7, the class org.codehaus.groovy.sandbox.markup.StreamingMarkupBuilder seems to have disappeared. Any ideas on its replacement?

In my case I'm just trying to create a simple XML (application.xml) file on disk...

markup = {
application() {
mkp.declareAlias(display: "display-name")
display("MyApp")
module() {
ejb("myapp-ejb.jar")
}
}
}

builder = new org.codehaus.groovy.sandbox.markup.StreamingMarkupBuilder()
doc = builder.bind(markup)

fos = new java.io.FileOutputStream("someFilepath.xml")
fos << doc

I've tried groovy.xml.MarkupBuilder() but that gives a groovy.lang.MissingMethodException:

[exec] Exception in thread "main" groovy.lang.MissingMethodException: No signature of method com.aegeus.intercert.agent.builder.JBossIntegratedAgentBuilder$_createA pplicationXml_closure6.application() is applicable for argument types: (com.aegeus.intercert.agent.builder.JBossIntegratedAgentBuilder$_create ApplicationXml_closure6_closure12) values: [com.aegeus.intercert.agent.builder.JBossIntegratedAgentBuilder$_create ApplicationXml_closure6_closure12@18352d8]

Any ideas?


Sean,

Due to a problem with the release process all the Groovy components of the release were omitted :(

You can grab the files from CVS HEAD nd compile them yourself. That's the best I can suggest I'm afraid.

As you are using XML tags which are not valid Groovy identifiers you will not be able to use MarkupBuilder as it does not support aliasing.


John Wilson
The Wilson Partnership
http://www.wilson.co.uk




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise