Hi, I am having an issue where I want to make use of the xmltask uncomment 
feature.

I have something of the following:


<code>

web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="someId" blah blah blah>

<!-- Uncomment this filter when deploying to an SSO environment 
<filter>
<filter-name>authFilter</filter-name>
<filter-class>blah</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
</web-app>

build.xml:


<taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask" />
<target name="alterWebXml">
<xmltask source="WebContent/WEB-INF/web.xml" dest="D:/deployment/web.xml" 
report="true">
<uncomment path="/web-app/comment()[4]" />
</xmltask>
</target>

</code>


I am able to successfully generate the new web.xml file in the given directory. 
It reads the old one in, and writes the new one to the given dest directory.
The problem is, it's not removing the comments where I said to remove them at. 
I know it has something to do with the path of the uncomment itself. I 
get no error, it simply never removes the comment. It is coming off of the root 
'web-app' element inside of the web.xml file but according to the 
documentation, 
I should be able to identify which comment in the document that I want to 
remove by comment()[index].

Any and all help that anyone could suggest as to what I am doing wrong would 
greatly be appreciated...

Thank you, dan 
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Xmltask-users mailing list
Xmltask-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xmltask-users

Reply via email to