@Override
   public String toString() {
      StringBuilder buf = new StringBuilder();
      if (tag != null) {
         buf.append(" tag:"+tag);
      }
      if (id != null) {
         buf.append(" id:"+id);
      }
      if (ref != null) {
         buf.append(" ref:"+ref);
      }
      if (parentTagName != null) {
         buf.append(" parentTag:"+parentTagName);
      }
      if (value != null) {
         buf.append(" value:"+value);
      }
      if (children != null) {
         buf.append(" [");
         for (GedcomTag child : getSortedChildren(children)) {
            buf.append(child.toString());
         }
         buf.append(" ]");
      }
      return buf.toString();
   }