public RootElement GetImmediateRootElement () { var section = Parent as Section; if (section == null) return null; return section.Parent as RootElement; }