How can I retrieve an element from Groovy's GPathResult using a string that contains a perioid

后端 未结 2 1096
感动是毒
感动是毒 2020-12-04 03:31
def elementPath = \"elementA.elementB\"
xml.\"${elementPath}\".each {}

How to make this work? xml.elementA.elementB.each {} works.

2条回答
提交回复
热议问题