ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: Inserting elements into an XML file
Date Fri, 18 Jun 2004 06:37:25 GMT
http://ant.apache.org/external.html#XmlTask

Jan



> -----Original Message-----
> From: John Lindwall [mailto:JLindwall@Xifin.com]
> Sent: Friday, June 18, 2004 1:07 AM
> To: 'Ant Users List'
> Subject: Inserting elements into an XML file
> 
> 
> I'd like to insert an element into an XML file using ant.  
> One use is to add a <WebAppComponent> element to a WebLogic 
> config.xml file and another is to add a <module> element to a 
> web.xml file.  
> 
> Not that its important to the problem at hand but I'm adding 
> cactus support to our app and so if the users wishes to 
> cactus-enable the build these elements must be inserted into 
> the otherwise standard {config,web}.xml files.
> 
> Any pointers?  Thanks!
> 
> An example, hopefully to better explain what I'm after --------
> 
> Original file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Domain>
>     <Application>
>         <EJBComponent Name="foo">
>     </Application>
> </Domain>
> 
> 
> After inserting a new element:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <Domain>
>     <Application>
>         <EJBComponent Name="foo">
>         <WebAppComponent Name="Here Is A New Element That 
> Inserted By Ant!!!!! NEAT!"/>
>     </Application>
> </Domain>
> 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message