XMLTask Ant Task

In MIDAS we use ant as one of our core techniques and also apply a couple of third-party tasks in addition, such as ant-contrib. I have written and contributed for example the ant tasks for the eXist XML database and have a extensive experience in writing custom ant tasks. That’s why I especially appreciate the XMLTask a task for XML modification and creation from OOPS Consultancy Ltd, a UK-based consulting company.

While a lot of jobs can be handled by specific XSL stylesheets, it always needs an extra XSL file in addition to the ant task ant doing small things like insert some tag or attribute, remove a portion etc. a direct XPath-based XML manipulation is much faster to write with the xmltask than writing templates in an XSLT. And the cool thing about the xmltask is that it can put the result of a XPath query into a buffer that can then e.g. be re-inserted into another document without writing it to a file or such, just a ant-internal object just like a fileset. So far I haven’t found anything that couldn’t be done with this task regarding XML processing, it even supports DTD catalogs and schemas, maintaining the DTD declaration etc. pp.

Most definitively a must look at!

Leave a Reply