You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Cool The Breezer <te...@yahoo.com> on 2009/04/16 10:57:26 UTC

Help regular expression for appending to the content of a tag

Hi,
   I am looking for help to append some text to the existing content of a tag. E.g. 
The existing content of the tag 
<Host> 
 <Context path="/xxx" reloadable="true" docBase="\WebRoot"/>
</Host>

And I want to append some more text like <Context path="/yyy" reloadable="true" docBase="\YYYRoot"/>, so the content of <Host> tag would be

<Host> 
 <Context path="/xxx" reloadable="true" docBase="\WebRoot"/>
 <Context path="/yyy" reloadable="true" docBase="\YYYRoot"/>
</Host>

I am currrently looking into replaceregexp filter but it is used for replace the test based on regex pattern. Appreciate your help

- RB


      

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


RE: Help regular expression for appending to the content of a tag

Posted by Felix Dorner <FD...@zed.com>.
Hey,

> And I want to append some more text like <Context path="/yyy"
> reloadable="true" docBase="\YYYRoot"/>, so the content of
> <Host> tag would be
>
> <Host>
>  <Context path="/xxx" reloadable="true" docBase="\WebRoot"/>
> <Context path="/yyy" reloadable="true" docBase="\YYYRoot"/> </Host>

Did you consider to use a strylesheet transformation?

Felix

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


Re: Help regular expression for appending to the content of a tag

Posted by Brian Agnew <br...@oopsconsultancy.com>.
If you're doing XML manipulation, <xmltask> is more appropriate.

http://www.oopsconsultancy.com/software/xmltask

Brian

Cool The Breezer wrote:
> Hi,
>    I am looking for help to append some text to the existing content of a tag. E.g. 
> The existing content of the tag 
> <Host> 
>  <Context path="/xxx" reloadable="true" docBase="\WebRoot"/>
> </Host>
>
> And I want to append some more text like <Context path="/yyy" reloadable="true" docBase="\YYYRoot"/>, so the content of <Host> tag would be
>
> <Host> 
>  <Context path="/xxx" reloadable="true" docBase="\WebRoot"/>
>  <Context path="/yyy" reloadable="true" docBase="\YYYRoot"/>
> </Host>
>
> I am currrently looking into replaceregexp filter but it is used for replace the test based on regex pattern. Appreciate your help
>
> - RB
>
>
>       
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>   

-- 
Brian Agnew                  http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012


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