}
else if (qName.equalsIgnoreCase("act:description")) {
currentAccount.setDescription(tagData);
}
else if (qName.equalsIgnoreCase("act:parent")) {
Account parent = new Account();
parent.setAccountID(tagData);
currentAccount.setParentAccount(parent);
}
}
else if (recordType.equalsIgnoreCase("transaction")) {
if (subRecordType.equalsIgnoreCase("date-posted")) {
if (qName.equalsIgnoreCase("ts:date")) {
currentTransaction.setDatePosted(convertToCalendar(tagData));
}
subRecordType = "";
}
else if (subRecordType.equalsIgnoreCase("date-entered")) {
if (qName.equalsIgnoreCase("ts:date")) {
currentTransaction.setDateEntered(convertToCalendar(tagData));
}
subRecordType = "";
}
else {
if (qName.equalsIgnoreCase("trn:id")) {
currentTransaction.setTransactionID(tagData);
}
else if (qName.equalsIgnoreCase("trn:description")) {
currentTransaction.setDescription(tagData);
}
else if (qName.equalsIgnoreCase("slot:key")) {
slotKey = tagData;
}
else if (qName.equalsIgnoreCase("slot:value")) {
slotValue = tagData;
}
else if (qName.equalsIgnoreCase("slot")) {
if (slotKey != null && slotKey.equalsIgnoreCase("online_id")) {
currentTransaction.setFitID(slotValue);
}
else if (slotKey != null && slotKey.equalsIgnoreCase("notes")) {
currentTransaction.setMemo(slotValue);
}
}
}
}
else if (recordType.equalsIgnoreCase("split")) {
if (subRecordType.equalsIgnoreCase("reconcile-date")) {
if (qName.equalsIgnoreCase("ts:date")) {
currentTransSplit.setReconcileDate(convertToCalendar(tagData));
}
subRecordType = "";
}
else {
if (qName.equalsIgnoreCase("split:id")) {
currentTransSplit.setTransSplitID(tagData);
}
else if (qName.equalsIgnoreCase("split:memo")) {
currentTransSplit.setMemo(tagData);
}
else if (qName.equalsIgnoreCase("split:reconciled-state")) {
currentTransSplit.setReconciledState(tagData);
}
else if (qName.equalsIgnoreCase("split:value")) {
String[] amountStrings = tagData.split("/");
Double amount = new Double(Double.parseDouble(amountStrings[0]) / Double.parseDouble(amountStrings[1]));
currentTransSplit.setAmount(amount);
}
else if (qName.equalsIgnoreCase("split:account")) {
Account account = new Account();
account.setAccountID(tagData);
currentTransSplit.setAccount(account);
}
}
}
}