public virtual void Parse(XNode element) { foreach (XNode subElement in ((XElement)element).Nodes()) { ATag tag = TagFactory.CreateATag(subElement is XElement ? ((XElement)subElement).Name.LocalName : string.Empty); tag.Parse(subElement); this.Tags.Add(tag); } }