public static StateMachine ParseFromXml(XmlNode node, StateMachine ret = null) { if (null == ret) { ret = new StateMachine(); } ret = (StateMachine)AbstractData.ParseFromXml(node, ret); XmlNode cnode = null; cnode = node.SelectSingleNode("showAs"); if (null != cnode) { //ret.showAs = cnode.InnerText; } return(ret); }
public static AbstractData ParseFromXml(XmlNode node, AbstractData ret = null) { if (null == ret) { return(null); } XmlNode cnode = null; cnode = node.SelectSingleNode("name"); if (null != cnode) { ret.name = cnode.InnerText; } cnode = node.SelectSingleNode("description"); if (null != cnode) { ret.description = cnode.InnerText; } return(ret); }
public static VerbalTable ParseFromXml(XmlNode node, VerbalTable ret = null) { if (null == ret) { ret = new VerbalTable(); } ret = (VerbalTable)AbstractData.ParseFromXml(node, ret); XmlNode cnode = null; cnode = node.SelectSingleNode("items"); if (null != cnode) { for (int i = 0; i < cnode.SelectNodes("item").Count; i++) { XmlNode dnode = cnode.SelectNodes("item").Item(i); ret.items.Add(Convert.ToInt32(dnode.SelectSingleNode("key").InnerText), dnode.SelectSingleNode("value").InnerText); } } return(ret); }