Ant任务获取重复XML元素的值

时间:2014-09-08 09:14:24

标签: ant

我有以下要求。

来自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

1 个答案:

答案 0 :(得分:0)

一个例子会有所帮助,但我想我之前在xmlproperty任务中发现了这个限制。为了执行外部文件的复杂处理,我将使用嵌入式groovy任务,它只是喜欢XML: - )

您尚未指定示例输入,因此这是一个类似的示例:

相关问题