For convenience (to prevent code duplication) it's better to have an
element knows which type it is.
Bug fixing XML metastore, adding setElementType() on IMetaStoreElement