0
我有一个这样的XML:Groovy中解析XML和获取属性
<MMP>
<MERCHANT>
<RESPONSE>
<url>http://203.114.240.77/paynetz/epi/fts</url>
<param name="ttype"></param>
<param name="tempTxnId"></param>
</RESPONSE>
</MERCHANT>
</MMP>
我怎么能得到的ttype
和tempTxnId
值。我试过了:
def details = new XmlParser().parseText(response)
details.MMP.RESPONSE //which returns the whole xml itself rather than its contents
我在哪里犯错?
在此先感谢。