[ANT] replace

F

fralef.sf

Hello
I'm using ANT and I'd like to replace some texte in a webpage

I have to replace <li><a href="../a/index.html"> by <li id="current"><a
href="../a/index.html">

here is the code :

<replace file="a/file.html"
token="<li><a href="../a/index.html">"
value="<li id="current"><a href="../a/index.html">"
/>

it is not working because the " < >


please help

thanks
 
D

Daniel Pitts

Hello
I'm using ANT and I'd like to replace some texte in a webpage

I have to replace <li><a href="../a/index.html"> by <li id="current"><a
href="../a/index.html">

here is the code :

<replace file="a/file.html"
token="<li><a href="../a/index.html">"
value="<li id="current"><a href="../a/index.html">"
/>

it is not working because the " < >


please help

thanks

Although, this isn't really a Java question, I think I can help...

You have " symbols inside your value attribute... That doesn't work.

Try this instead:

<replace file="a/file.html"
token="<li><a href=&quote;../a/index.html&quote;>"
value="<li id=&quote;current&quote><a
href=&quote;../a/index.html&quote;>"
/>

Although, I would think it would be better to edit the file directly,
rather than at build time.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,278
Latest member
BuzzDefenderpro

Latest Threads

Top