The previous responder is correct, but just so it's clear, the nodes you
specify in the xpath have to reference the namespace the elements are
associated with, and since you're using the default namespace, you have
to specify the empty prefix with just ":", which isn't the same as not
specifying the colon at all.
________________________________
From: Verre Raffaele [mailto:[EMAIL PROTECTED]
Sent: Friday, October 10, 2008 7:37 AM
To: xmltask-users@lists.sourceforge.net
Subject: [Xmltask-users] Attribute change issue when xmlns is
present
Hi
I have an xml file like this:
<beans xmlns="http://www.springframework.org/schema/beans
<http://www.springframework.org/schema/beans> "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> "
xsi:schemaLocation="http://www.springframework.org/schema/beans
<http://www.springframework.org/schema/beans>
http://www.springframework.org/schema/beans/spring-beans.xsd
<http://www.springframework.org/schema/beans/spring-beans.xsd> ">
<bean class="it.pitagora.myClass" id="router"/>
</beans>
when I execute the code:
<xmltask source="invoker.xml" dest="invoker.xml" report="true"
preserveType="true">
<attr path="beans/[EMAIL PROTECTED]'router']" attr="class"
value="it.pitagora.otherClass"/>
</xmltask>
nothing happen.
If I delete the xmlns attribute :
<beans>
<bean class="it.pitagora.myClass" id="router"/>
</beans>
previous code work fine.
Any idea to risolve this issue?
There's something wrong in my code?
Thanks a lo for you reply
Raffaele Verre
Raffaele Verre
e way Enterprise Business Solutions S.r.l.
c/o Nuova Pitagora s.r.l. - Via Cattaneo 23 - 87100
email: [EMAIL PROTECTED]
tel: 0984 - 899340
Informativa ai sensi del codice della Privacy (D. Lgs. 196 -
30/06/2003) <blocked::mailto:[EMAIL PROTECTED]>
http://www.pitagora.it/196/signature.html
<http://www.pitagora.it/196/signature.html>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users