//
// METHOD : BuildDetail
// DESCRIPTION : Create bulk of error log, parameters fill in the specific details like error type, variable name, and explanation
// PARAMETERS : string name - Variable name
// string type - Error type
// string explanation - Explanation of error
// RETURNS : XmlNode node - XML containing constructed log.
//
public XmlNode BuildDetail(string name, string type, string explanation)
{
XmlDocument doc = new System.Xml.XmlDocument();
XmlNode node = doc.CreateNode(XmlNodeType.Element, SoapException.DetailElementName.Name, SoapException.DetailElementName.Namespace);
XmlNode details;
XmlAttribute nameAttr;
XmlAttribute errorTypeAttr;
XmlAttribute explanationAttr;
details = doc.CreateNode(XmlNodeType.Element, "ParameterError", "http://localhost/LoanService");
nameAttr = doc.CreateAttribute("s", "name", "http://localhost/LoanService");
nameAttr.Value = name;
errorTypeAttr = doc.CreateAttribute("s", "errorType", "http://localhost/LoanService");
errorTypeAttr.Value = type;
explanationAttr = doc.CreateAttribute("s", "explanation", "http://localhost/LoanService");
explanationAttr.Value = explanation;
details.Attributes.Append(nameAttr);
details.Attributes.Append(errorTypeAttr);
details.Attributes.Append(explanationAttr);
node.AppendChild(details);
return(node);
}