Set listkey = itemLines.keySet();
Iterator it = listkey.iterator();
String itemExternalID = "";
int id = 0;
String fmt = "0.00#";
DecimalFormat df = new DecimalFormat(fmt, new DecimalFormatSymbols(Locale.US));
Integer itemID = new Integer(1);
while (it.hasNext())
{
Object obj = it.next();
itemID = Integer.valueOf(obj.toString());
ItemElement ele = (ItemElement)itemLines.get(itemID.toString());
IntMember ItemId = (IntMember)ele.get("ItemId");
id = Integer.valueOf(ItemId.getDisplayString()).intValue();
//itemID = (Integer)ItemId.getMemberValue();
itemExternalID = getEXIDFromID("Item", id);
StringMember sku = (StringMember)ele.get("SKU");
FloatMember qty = (FloatMember)ele.get("Quantity");
FloatMember priceEach = (FloatMember)ele.get("PriceEach");
FloatMember priceExe = (FloatMember)ele.get("PriceExtended");
qbTags += "<" + tagName + "> \n" + "<ItemRef> \n" + "<ListID>" + itemExternalID + "</ListID> \n" + "</ItemRef> \n" + "<Quantity>" + df.format(Float.valueOf(qty.getMemberValue().toString())) + "</Quantity> \n" + "<Rate>" + df.format(Float.valueOf(priceEach.getMemberValue().toString())) + "</Rate> \n" + "<Amount>"
+ df.format(Float.valueOf(priceExe.getMemberValue().toString())) + "</Amount> \n" + "</" + tagName + "> \n";
}
return qbTags;
}