protected void ExtractConstants(TypedEntity typedEntity, XElement root) { IEnumerable <XElement> constantElements = from el in root.Descendants("h3") where (String)el.Attribute("class") == "constantGroup" || (String)el.Attribute("class") == "tight jump typeDef" select el; foreach (XElement constantElement in constantElements) { List <BaseEntity> entities = this.ConstantParser.Parse(typedEntity, constantElement); if (entities != null) { typedEntity.AddRange(entities); } } // Constants constantElements = from el in root.Descendants("h4") select el; foreach (XElement constantElement in constantElements) { List <BaseEntity> entities = this.ConstantParser.Parse(typedEntity, constantElement); if (entities != null) { typedEntity.AddRange(entities); } } }