In the Google Checkout integration, I'm needing to parse the following xml string...
<?xml version="1.0" encoding="UTF-8"?><checkout-redirect xmlns="http://checkout.google.com/schema/2" serial-number="ec09382f-c1b3-4ab2-8090-35906e3918e6"> <redirect-url> https://sandbox.google.com/checkout/view/buy?o=shoppingcart&shoppingcart=dgfi89u2398 </redirect-url> </checkout-redirect> I have it contained as a string. How do I get the value of the redirect-url (https://sandbox.google.com/checkout/view/buy?o=shoppingcart&shoppingcart=dgfi89u2398)? I've tried the following: ============= response = <?xml version ... (from above) document = org.ofbiz.base.util.UtilXml.readXmlDocument(response); rootElement = document.getRootElement; childList = org.ofbiz.base.util.UtilXml.childElementList(rootElement); childListIter = childList.iterator(); while (childListIter.hasNext()){ child = childListIter.next(); nodeName = child.getNodeName(); if ("call-map-processor".equals(nodeName)){ redirect = org.ofbiz.base.util.UtilXml.elementValue(child); } ============== document ends up returning [#document: null] any ideas would greatly be appreciated. Thanks! -Chris
