Forum Discussion
M_McDonald
13 years agoSuper Contributor
Certainly you can get the values in a multidimensional array:
But if you are going to concatenate them anyway why not just do so right away?
It looks to me like you will get each result in a separate column in your worksheet - is that what you intended? If you actually wanted each result in a separate row I think the whole thing could be done with a DataSource-DataSink-DataSource Loop setup. No coding necessary.
def indicators = []
holder.getDomNodes('//ns5:search-result').each {
def attrs = []
attrs << it.getAttribute('match-indicator') << it.getAttribute('search-name') << it.getAttribute('match-score')
indicators << attrs
}
But if you are going to concatenate them anyway why not just do so right away?
def indicators = []
holder.getDomNodes('//ns5:search-result').each {
indicators << it.getAttribute('match-indicator') + "_" + it.getAttribute('search-name') + "_" + it.getAttribute('match-score')
}
It looks to me like you will get each result in a separate column in your worksheet - is that what you intended? If you actually wanted each result in a separate row I think the whole thing could be done with a DataSource-DataSink-DataSource Loop setup. No coding necessary.