for (Cookie cookie : runtime.getCookieStore(cookieKey).getCookies()) {
tree.addStartElement(c_cookie);
tree.addAttribute(_name, cookie.getName());
tree.addAttribute(_value, cookie.getValue());
tree.addAttribute(_domain, cookie.getDomain());
tree.addAttribute(_path, cookie.getPath());
//tree.addAttribute(_secure, cookie.getSecure() ? "true" : "false");
//tree.addAttribute(_version, ""+cookie.getVersion());
Date date = cookie.getExpiryDate();
if (date != null) {
String iso = iso8601.format(date);