Forum Discussion
vijaydi
13 years agoContributor
Much appreciate your response jmistrik.
I tried the code suggested, and when trying to print the array list I get null as the outcome. Please advice. I have attached the resposne hereiwth, which we are trying to parse.
I tried the code suggested, and when trying to print the array list I get null as the outcome. Please advice. I have attached the resposne hereiwth, which we are trying to parse.
def contract = context.expand('${IDM_Modified#Response}')
Node xml = new XmlParser(false, false).parseText(contract)
log.info xml
java.util.List<String> list = new java.util.ArrayList<String>();
xml."ns5:response[0]"."ns5:search-results[0]"."ns5:search-result".each
{
list.add(it.@match-indicator)
}
log.info list [0]