Ant xmlproperty task. What happens when there is more than one tag with the same name?

前端 未结 1 830
情歌与酒
情歌与酒 2021-01-12 08:09

I am trying to follow a large ant buildfile that I have been given, and I am having trouble understanding the functionality of xmlproperty in this case. Consider this xml fi

1条回答
  •  旧巷少年郎
    2021-01-12 08:48

    When multiple elements have the same name, creates a property with comma-separated values:

    
        
            
    
            ${PREFIX.main.tagList.tag.file}
        
    
    

    The result:

    run:
         [echo] file1,file2
    

    To process the comma-separated values, consider using the task from the third-party Ant-Contrib library:

    
        
        
            
    
            
                
                    @{file}
                
            
        
    
    

    The result:

    run:
         [echo] file1
         [echo] file2
    

    0 讨论(0)
提交回复
热议问题