You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Zakir <za...@hotmail.com> on 2008/02/02 01:06:09 UTC

XMLtask trouble with

Hi all.

I am using Ant 1.70 and XMLtask 1.15.1

This is my scenario: I have a simple bean definition file.  I need to run
ant tasks to inject beans into this file.  My bean definition file looks
something like:

<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.or.......>
        
            <bean>....</bean>
            ........
</beans>

Now, if I try and run an <insert> task, with path="/beans", it isn't able to
locate the xpath and doesn't insert anything.  Now, if I remove all the
information from the <beans> root tag, it works!  Is this some kind of bug
with XMLtask? 

Thanks!

-- 
View this message in context: http://www.nabble.com/XMLtask-trouble-with-%3Cinsert%3E-tp15236553p15236553.html
Sent from the Ant - Users mailing list archive at Nabble.com.


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


Re: XMLtask trouble with

Posted by Brian Agnew <br...@oopsconsultancy.com>.
Hi Zakir,

Probably best to mail the XMLTask mailing list with XMLTask-specific 
questions. xmltask-users@lists.sourceforge.net 
<ma...@lists.sourceforge.net>

I suspect you need to specify an XPath with the appropriate namespace 
info. e.g. in the below use:

path="/*[local-name()='bean']"

or

path="/:bean"

Brian

Zakir wrote:
> Hi all.
>
> I am using Ant 1.70 and XMLtask 1.15.1
>
> This is my scenario: I have a simple bean definition file.  I need to run
> ant tasks to inject beans into this file.  My bean definition file looks
> something like:
>
> <beans xmlns="http://www.springframework.org/schema/beans"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:aop="http://www.springframework.or.......>
>         
>             <bean>....</bean>
>             ........
> </beans>
>
> Now, if I try and run an <insert> task, with path="/beans", it isn't able to
> locate the xpath and doesn't insert anything.  Now, if I remove all the
> information from the <beans> root tag, it works!  Is this some kind of bug
> with XMLtask? 
>
> Thanks!
>
>   

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