RomCastle Posted July 23, 2018 Report Share Posted July 23, 2018 I am new in groovy and I hope to solicit your feedback. I have a requirement to parse the content from the xml and generate new xml dynamically. Input:<Raw> <Param>fname=Hello&lname=World</Param> </Raw> Requirement: 1. Parse Param using & as identifier 2. Put parsed data to an array. e.g. array: [fanme=Hello, lname=World] 3. Loop into the array while creating an xml. Value element below, should be dynamically generated based on the array content. e.g <Info> <Value name=fname>Hello</Value> <Value name=lname>World</Value> </Info> 5. Return the result/generated xml document as a string. I hope you can help me on this case study. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.