internal virtual void WriteToXMLNode(XmlElement iNode) { iNode.SetAttribute("name", Name); if (!String.IsNullOrEmpty(English)) { iNode.SetAttribute("english", English); } if (Geocode != 0) { iNode.SetAttribute("geocode", Geocode.ToString()); } String s = ""; foreach (Int32 i in NewGeocode) { s = s + i.ToString() + " "; } if (!String.IsNullOrEmpty(s)) { s = s.Remove(s.Length - 1); iNode.SetAttribute("newgeocode", s); } if (Type != EntityType.Unknown) { iNode.SetAttribute("type", Type.ToString()); } if (Total > 0) { iNode.SetAttribute("total", Total.ToString()); } if (Female > 0) { iNode.SetAttribute("female", Female.ToString()); } if (Male > 0) { iNode.SetAttribute("male", Male.ToString()); } if (Households > 0) { iNode.SetAttribute("households", Households.ToString()); } s = ""; foreach (Int32 i in GeocodeParent) { s = s + i.ToString() + " "; } if (!String.IsNullOrEmpty(s)) { s = s.Remove(s.Length - 1); iNode.SetAttribute("parent", s); } if (!String.IsNullOrEmpty(Comment)) { iNode.SetAttribute("comment", Comment); } foreach (EntityOffice lOffice in Offices) { lOffice.ExportToXML(iNode); } foreach (PopulationDataEntry lEntity in SubEntities) { lEntity.ExportToXML(iNode); } }