ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: DynamicConfigurator and friends
Date Fri, 14 Jan 2005 08:03:22 GMT
On Thu, 13 Jan 2005, Brian Topping <> wrote:

> I'm trying to use DynamicConfigurator and need a bit of
> clarification.  I'd like to make the child text of a Task (defined
> with a taskdef) be usable as a String by the Task.

That would be the addText(String) method, no DynamicFoo involved at
all, if you really were talking about nested text.

> The issue is that the "arbitrary" text is XML

which makes it nested elements, and not nested text at all.

> Is this possible without wrapping the text in a CDATA?

Ant's CVS HEAD contains a class[1] that captures arbitrary XML
structures, add a child element to your task via

public void addChild(XMLFragment frag) {

and the you can use 

    ... arbitrary XML goes here ...

and then serialize the DocumentFragment held by XMLFragement into a


[1]  in src/main/org/apache/tools/ant/util/

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message