You need to specify your source (where you're reading from) and the
destination (where you're writing to) in the <xmltask> section. Then you
don't need the file attribute in the <insert> instruction. I suspect
that'll do it.
Not sure about the text() in your 'path' either. I think you can lose that.
On 16/4/09 12:08, Cool The Breezer wrote:
Hi Brian, I was too fast in concluding about classpath in my last mail.
Anyway, I am trying to use insert task for appending my text in target xml
file. However this does not seem to work as expected. Just wanted to verify,
whether implementation was correct'
<target name="deploy_local">
<xmltask report="true">
<insert path="Server/Service/Engine/Host/text()"
file="${tomcat.home}/conf/server.xml"
position="after">
<![CDATA[
<Context path="/doceng" reloadable="true"
docBase="C:\officeworkspace\doceng\webapp">
<Resource name="jdbc/docengdb" auth="Container"
xxx...... </Context>
]]>
</insert>
</xmltask>
</target>
--- On Thu, 4/16/09, Cool The Breezer<[email protected]> wrote:
From: Cool The Breezer<[email protected]>
Subject: Re: Help regular expression for appending to the content of a tag
To: "Ant Users List"<[email protected]>
Date: Thursday, April 16, 2009, 6:36 AM
Yes, I have looked into it and trying too. Not sure why I
am getting taskdef class
com.oopsconsultancy.xmltask.ant.XmlTask cannot be found
error.
I have added xmltask.jar in ANT_HOME/lib directory and also
added to system CLASSPATH too. But still getting the error.
- RB
--- On Thu, 4/16/09, Brian Agnew<[email protected]>
wrote:
From: Brian Agnew<[email protected]>
Subject: Re: Help regular expression for appending to
the content of a tag
To: "Ant Users List"<[email protected]>
Date: Thursday, April 16, 2009, 6:25 AM
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: [email protected]
For additional commands, e-mail: [email protected]
-- Brian Agnew
http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--
Brian Agnew http://www.oopsconsultancy.com
OOPS Consultancy Ltd
Tel: +44 (0)7720 397526
Fax: +44 (0)20 8682 0012