The SizeInjectorTask ant task analyzes a given xml file and injects the correct filesize values automatically into the xml. The SizeInjectorTask checks the xml file for nodes with a src and a filesize attribute. If such a node is found it' parent node is checked for a path attribute. Now the path to the resource is assembled from the path of the parent node (if present) and the src attribute of the node. Then the SizeInjectorTask can look up the filesize of the resource write the result into the filesize attribute of the node.
You can integrate the SizeInjectorTask into you ant build like this:
```
```
The code snippet assumes that the build.xml and the org.splink.ant.filesizeinjectortask.jar live in the project's root folder and the resourcebundles.xml is located at config/resourcebundles.xml A complete sample ant build file is included in the current splinkresource release.
The SizeInjectorTask is not limited to xml files which strictly follow the resourcebundles.dtd structure, in fact it can be used on any xml as long as the xml follows the rules outlined above.