public List <TrayCheckouttransactionRetErro> getGeneralError() { generalError = ""; TrayCheckouttransactionRetErro err = new TrayCheckouttransactionRetErro(); List <TrayCheckouttransactionRetErro> lstret = new List <TrayCheckouttransactionRetErro>(); /* Generic Errors */ XmlNodeList generalErrorList = xmlDocument.GetElementsByTagName("general_error"); foreach (XmlNode pm in generalErrorList) { err.code = pm["code"].InnerText; err.message = pm["message"].InnerText; lstret.Add(err); } XmlNodeList errorList = xmlDocument.GetElementsByTagName("error"); foreach (XmlNode pm in errorList) { err.code = pm["code"].InnerText; err.message = pm["message"].InnerText; lstret.Add(err); } return(lstret); }
public List <TrayCheckouttransactionRetErro> getValidationError() { TrayCheckouttransactionRetErro err = new TrayCheckouttransactionRetErro(); List <TrayCheckouttransactionRetErro> lstret = new List <TrayCheckouttransactionRetErro>(); XmlNodeList validationErrorList = xmlDocument.GetElementsByTagName("validation_error"); foreach (XmlNode pm in validationErrorList) { string code = pm["code"].InnerText; string msg = pm["message"].InnerText; string field = pm["field"].InnerText; string messageComplete = pm["message_complete"].InnerText; err.code = pm["code"].InnerText; err.message = pm["message"].InnerText; err.field = pm["field"].InnerText; err.message_complete = pm["message_complete"].InnerText; lstret.Add(err); } return(lstret); }