Example #1
0
 /**
  * Sets the {@linkplain #rootTag} property.
  *
  * @param rootTag to be used as XML root tag
  * @throws IllegalArgumentException if tag is null or empty
  * @throws IllegalStateException if write isn't in initial state
  */
 public void setRootTag(String rootTag) {
   if (!XMLUtil.isLegalXMLTag(rootTag)) {
     throw new IllegalArgumentException("rootTag: illegal: " + rootTag);
   }
   if (!this.isInitialState()) {
     throw new IllegalStateException("writer write in progress");
   }
   this.checkNotSharedConfiguration();
   this.rootTag = rootTag;
 }