/// <summary> /// Load mining field from xmlnode /// </summary> /// <param name="node"></param> /// <returns></returns> public static MiningField loadFromXmlNode(XmlNode node) { MiningField field = new MiningField(node.Attributes["name"].Value); if (node.Attributes["usageType"] != null) { field.usageType = FieldUsageTypeFromString(node.Attributes["usageType"].Value); } //field.name = node.Attributes["name"].Value; /*if (node.Attributes["probability"] != null) * field.fprobability = node.Attributes["probability"].Value; * * if (node.Attributes["confidence"] != null) * field.fconfidence = node.Attributes["confidence"].Value;*/ return(field); }
/// <summary> /// Load mining schema from xmlnode /// </summary> /// <param name="node"></param> /// <returns></returns> public static MiningSchema loadFromXmlNode(XmlNode node) { MiningSchema schema = new MiningSchema(); foreach (XmlNode item in node.ChildNodes) { if ("Extension".Equals(item.Name)) { //tree.Node = Node.loadFromXmlNode(item); } else if ("MiningField".Equals(item.Name)) { schema.MiningFields.Add(MiningField.loadFromXmlNode(item)); } else { throw new NotImplementedException(); } } return(schema); }