xmltask

Using filename in xmltask sections at runtime

Xmltask is a valuable extension to Apache ANT for processing XML files. It is possible to apply one same task to multiple XML-files using wildcards in the attribute source of xmltask or by using the type. The capability of using wildcards in the attribute source will be deprecated, so it would be wise to anticipate on this by using using the type when using wildcards. When processing multiple files using xmltask it would be nice to have the name of the file being processed at runtime, however xmltask does not supply a way to extract or use this filename as a property. You can workaround this is by using a separate target looping through the files in the file set and calling your xmltask target for each of the files in the file set passing the filename as a parameter.

Read More...
Comments