我有以下要求。
来自Ant xmlproperty task. What happens when there is more than one tag with the same name?的它清楚如何重复每个文件。 我的要求是迭代每个文件,我想获得' machine'相应文件的元素 例如:
<echo>${PREFIX.main.tagList.tag.file[file1]}</echo> // should return machine1
<echo>${PREFIX.main.tagList.tag.file[file2]}</echo> // should return machine2
答案 0 :(得分:0)
一个例子会有所帮助,但我想我之前在xmlproperty任务中发现了这个限制。为了执行外部文件的复杂处理,我将使用嵌入式groovy任务,它只是喜欢XML: - )
您尚未指定示例输入,因此这是一个类似的示例: