/// <summary>
 /// Reverses a <see cref="StandardIndustryClassification"/> into 
 /// its NAICS groups.
 /// </summary>
 /// <param name="sic"></param>
 /// <returns></returns>
 public static Tuple<NaicsPrimarySector, NaicsSector, NaicsMarket> LookupNaicsBySic(
     StandardIndustryClassification sic)
 {
     var allSectors = AllSectors;
     if (allSectors == null)
         return null;
     foreach (var s in AllSectors)
     {
         foreach (var ps in s.Divisions.Cast<NaicsPrimarySector>())
         {
             foreach (var ns in ps.Divisions.Cast<NaicsSector>())
             {
                 foreach (var mk in ns.Divisions.Cast<NaicsMarket>())
                 {
                     var ssic = mk.Divisions.Cast<StandardIndustryClassification>()
                         .FirstOrDefault(x => x.Equals(sic));
                     if (ssic == null)
                         continue;
                     return new Tuple<NaicsPrimarySector, NaicsSector, NaicsMarket>(ps, ns, mk);
                 }
             }
         }
     }
     return null;
 }
        public override bool TryThisParseXml(XmlElement elem)
        {
            if (!base.TryThisParseXml(elem))
                return false;
            if (!elem.HasChildNodes)
                return true;

            foreach (var cNode in elem.ChildNodes)
            {
                var cElem = cNode as XmlElement;
                if (cElem == null)
                    continue;
                var sic = new StandardIndustryClassification();
                if (sic.TryThisParseXml(cElem))
                    divisions.Add(sic);
            }

            return true;
        }