Forum Discussion
HimanshuTayal
5 years agoCommunity Hero
You can refer below link to modify/create XML at runtime using groovy script.
- praneeth125 years agoOccasional Contributor
Thank you for your reply.
I tried with below code
addNewNode = """ """" // new node in parseText format
def root8 = new XmlParser().parseText( requestXML ) // converted request xml into parseText
for (item in root8){
for(test1 in item){
nodelist = test1.value()
nodelist.add(addNewNode)
}
}
log.info root8
String outxml = groovy.xml.XmlUtil.serialize(root8)I am able to append node but the problem was when i am serializing data in xml format, new node is on parsetext format.How to serialize new node.
Any one help me on this..
Related Content
- 3 years ago
Recent Discussions
- 15 years ago