ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: custom task & 'untouched' xml from build file
Date Fri, 21 Jun 2002 15:36:00 GMT
You could use an addText method and put your nested XML as CDATA.  Or have
the data as separate XML files and refer to them using file="data.xml"
perhaps.

Or you could use the DynamicConfigurator interface and reconstruct the XML
as Ant hands it to each piece - although this is probably more trouble than
its worth to get the entire thing - you'd need to come up with an object
model that would hold the representation and then convert it back to an XML
string somehow.

    Erik



----- Original Message -----
From: <Erik.Ostermueller@alltel.com>
To: <ant-user@jakarta.apache.org>
Sent: Friday, June 21, 2002 11:24 AM
Subject: custom task & 'untouched' xml from build file


I'm trying to figure out whether ANT is the right tool for a particular
task.

I'm writing a test harness that submits XML messages to a server.

I've read the doc for custom tasks.  It seems that ANT will parse the
XML
and pass it to your task one 'piece' at a time.  The 'pieces' are things
like
values of attributes, element text, nested elements.

I would like the top level of my custom task xml to behave exacltly like
this.
However, I'd like ANT to pass all nested XML to me in an unaltered form,
not piece by piece.

Is there a way to configure this, or is this something I must customize
myself?

My motivation for doing this is the following:  I want to encode the
business XML
message in the build file.  I need the business message in-tact so MY
code can marshal
it into an object (using Castor).

Thanks for such a great product.

erik.ostermueller@alltel.com

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>




--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message