public bool ParseNode(XmlNode node) { name = "m_" + node.Name; type = node.Name; foreach (XmlAttribute attr in node.Attributes) { m_fields.Add(ParseAttribute(attr)); } foreach (XmlNode child in node.ChildNodes) { if (child.NodeType != XmlNodeType.Element) { continue; } var field = XmlBase.Parse(child); if (field.IsAttr) { field.IsAttr = false; field.IsChildAttr = true; } m_fields.Add(field); } return(true); }
public bool ParseNode(XmlNode node) { name = "m_" + node.Name; foreach (XmlNode child in node.ChildNodes) { if (child.NodeType != XmlNodeType.Element) { continue; } m_list.Add(XmlBase.Parse(child)); } if (m_list.Count > 0) { type = string.Format("List<{0}>", m_list[0].type); } else { type = "List<object>"; } return(true); }