/// <summary>Parses a segment group profile </summary> private SegGroup parseSegmentGroupProfile(System.Xml.XmlElement elem) { SegGroup group = new SegGroup(); parseProfileStuctureData(group, elem); parseChildren(group, elem); return(group); }
/// <summary>Parses children (i.e. segment groups, segments) of a segment group or message profile </summary> private void parseChildren(AbstractSegmentContainer parent, System.Xml.XmlElement elem) { int childIndex = 1; System.Xml.XmlNodeList children = elem.ChildNodes; for (int i = 0; i < children.Count; i++) { System.Xml.XmlNode n = children.Item(i); if (System.Convert.ToInt16(n.NodeType) == (short)System.Xml.XmlNodeType.Element) { System.Xml.XmlElement child = (System.Xml.XmlElement)n; if (child.Name.ToUpper().Equals("SegGroup".ToUpper())) { SegGroup group = parseSegmentGroupProfile(child); parent.setChild(childIndex++, group); } else if (child.Name.ToUpper().Equals("Segment".ToUpper())) { Seg segment = parseSegmentProfile(child); parent.setChild(childIndex++, segment); } } } }
/// <summary>Parses a segment group profile </summary> private SegGroup parseSegmentGroupProfile(System.Xml.XmlElement elem) { SegGroup group = new SegGroup(); parseProfileStuctureData(group, elem); parseChildren(group, elem); return group; }