Changeset 33629

Show
Ignore:
Timestamp:
07.11.2019 14:20:36 (7 days ago)
Author:
kjdon
Message:

added methods using Parameter2 - for params with text node values

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/util/GSXML.java

    r33610 r33629  
    10041004    } 
    10051005 
     1006  // for parameters where value is an attribute 
    10061007    public static Element createParameter(Document owner, String name, String value) 
    10071008    { 
     
    10121013    } 
    10131014 
     1015  // for parameters where value is a text node 
     1016  public static Element createParameter2(Document owner, String name, String value) { 
     1017    Element param = owner.createElement(PARAM_ELEM); 
     1018    param.setAttribute(NAME_ATT, name); 
     1019    param.appendChild(owner.createTextNode(value)); 
     1020    return param; 
     1021  }      
     1022 
    10141023  public static void addParameterToList(Element param_list, String name, String value) { 
    10151024    Element p = createParameter(param_list.getOwnerDocument(), name, value); 
     1025    param_list.appendChild(p); 
     1026  } 
     1027  public static void addParameter2ToList(Element param_list, String name, String value) { 
     1028    Element p = createParameter2(param_list.getOwnerDocument(), name, value); 
    10161029    param_list.appendChild(p); 
    10171030  }