public XmlAnalyser(string xmlFileName) { _xmlFileName = xmlFileName; _xDocument = XDocument.Load(_xmlFileName); using(IEnumerator<XElement> iterator = _xDocument.Root.Elements().GetEnumerator()) { iterator.MoveNext(); _entity = new XmlObject(iterator.Current); } }