Author Login
Post Reply
I'm trying to use the find() method of GPathResult, but I'm not finding
anything. I can't seem to find any good documentation on how to use the find
method call. Below is what I'm trying to do. Can someone tell me what I'm
doing wrong, as it prints nothing, rather than the Txn node I'm expecting to
find.
Thanks,
GTG
String s = "<Msg><Txn>fwdsmsreceipt</Txn><JobId>1234</JobId></Msg>";
def msgBody = new XmlSlurper().parseText(s);
def r = msgBody.find { it.name().equalsIgnoreCase("Txn") }
println(r);
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email