{
ItemLines itemLines = new ItemLines();
int length = list.getLength();
Document document = null;
for (int j = 0; j < length; j++)
{
document = getDocumentFromString(list.item(j).toString());
ItemElement ie = new ItemElement();
int itemId = 0;
String sku = "";
String externalID = "";
String cvID = "";
if (document.getElementsByTagName("ItemRef").getLength() != 0)
{
sku = getValueOfNodeByTagName(document.getElementsByTagName("ItemRef").item(0), "FullName");
externalID = getValueOfNodeByTagName(document.getElementsByTagName("ItemRef").item(0), "ListID");
cvID = getIDFromEXID("Item", externalID);
if (!cvID.equals(""))
itemId = Integer.parseInt(cvID);
}
if (cvID.equals("0") || cvID.equals(""))
continue;
IntMember ItemId = new IntMember("ItemId", itemId, 'D', "", 'T', false, 20);
StringMember SKU = new StringMember("SKU", sku, 'D', "", 'T', false);
String desc = "";
if (document.getElementsByTagName("Desc").getLength() != 0)
{
desc = getValueOfNodeByTagName(document.getFirstChild(), "Desc");
}
StringMember Description = new StringMember("Description", desc, 'D', "", 'T', false);
String qty = "0";
if (document.getElementsByTagName("Quantity").getLength() != 0)
{
qty = getValueOfNodeByTagName(document.getFirstChild(), "Quantity");
}
FloatMember Quantity = new FloatMember("Quantity", new Float(qty), 'D', "0", 'T', false, 20);
String priceEach = "0";
if (document.getElementsByTagName("Rate").getLength() != 0)
{
priceEach = getValueOfNodeByTagName(document.getFirstChild(), "Rate");
}
FloatMember PriceEach = new FloatMember("PriceEach", new Float(priceEach), 'D', "", 'T', false, 20);
String priceExt = "0";
if (document.getElementsByTagName("PriceExtended").getLength() != 0)
{
priceExt = getValueOfNodeByTagName(document.getFirstChild(), "PriceExtended");
}
FloatMember PriceExtended = new FloatMember("PriceExtended", new Float(priceExt), 'D', "", 'T', false, 20);
FloatMember UnitTax = new FloatMember("UnitTax", new Float("1"), 'D', "", 'T', false, 20);
FloatMember unitTaxrate = new FloatMember("UnitTax", new Float("1"), 'D', "", 'T', false, 20);