Re: Iterate ArrayList over XML Groovy

2016-08-14 Thread Paul King
There are numerous ways to manipulate XML depending on exactly what you are wanting to achieve. The following might be useful: def xml = '''\ 2 4 123 ''' def list = ['response', 'value', 'a', 'b', 'e'] def root = new XmlParser().parseText(xml

Re: Iterate ArrayList over XML Groovy

2016-08-14 Thread GroovyBeginner
Thanks It worked!! what does refer in the script. Could you please explain me the significance of using '..' in the script? -- View this message in context: http://groovy.329449.n5.nabble.com/Iterate-ArrayList-over-XML-Groovy-tp5734628p5734637.html Sent from the Groovy Dev mailing list archive

Re: Iterate ArrayList over XML Groovy

2016-08-14 Thread Paul King
'..' is a shorthand for parent(), so the script removes unwanted nodes by removing them from their parent node. Cheers, Paul. On Sun, Aug 14, 2016 at 10:31 PM, GroovyBeginner wrote: > Thanks It worked!! what does refer in the script. Could you please explain > me the significance of using '..'

Re: Iterate ArrayList over XML Groovy

2016-08-14 Thread GroovyBeginner
Thanks a lot for the explanation :) -- View this message in context: http://groovy.329449.n5.nabble.com/Iterate-ArrayList-over-XML-Groovy-tp5734628p5734639.html Sent from the Groovy Dev mailing list archive at Nabble.com.

Re: Iterate ArrayList over XML Groovy

2016-08-14 Thread GroovyBeginner
In this case If I dont specify the value of e in the list. It is not appearing in the output.How to get all the child nodes of a parent which is present in the arraylist. For example if my list and input has the following Since a and b are present in the list and node e is a part of b and g is n