Exemplo n.º 1
0
  /**
   * Sets the value of the given attribute.
   *
   * @param caseSensitive if true, the attribVal case is kept, if false, the value is set as
   *     lowercase
   */
  private void setAttribute(
      Element e, XMLAttributes attrib, String attribVal, boolean caseSensitive) {
    if (attribVal == null) return;

    if (caseSensitive) {
      e.setAttribute(attrib.getXMLName(), attribVal);
    } else setAttribute(e, attrib, attribVal);
  }
Exemplo n.º 2
0
 /**
  * Sets the value of the given attribute to lowerCase, if the value is not null, otherwise it
  * doesn't do anything
  *
  * @param e element to set the attribute value for
  */
 private void setAttribute(Element e, XMLAttributes attrib, String attribVal) {
   if (attribVal == null) return;
   e.setAttribute(attrib.getXMLName(), attribVal.toLowerCase());
 }