/** * Returns the root tag of the XML structure. * * @return The first ancestor to have no parent. */ public XMLTag getRootTag() { if (ParentTag == null) { return this; } else { return ParentTag.getRootTag(); } }