Changeset 28982

Show
Ignore:
Timestamp:
17.04.2014 13:10:38 (5 years ago)
Author:
kjdon
Message:

added a couple of convenience methods and changed the name of another method to better reflect what it is doing

Files:
1 modified

Legend:

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

    r28963 r28982  
    807807        } 
    808808    } 
    809    
    810    public static void copyElement(Element to, Element from, String elem_name) { 
     809 
     810  public static void copyNode(Element to_elem, Node original_element) { 
     811    to_elem.appendChild(to_elem.getOwnerDocument().importNode(original_element, true)); 
     812 
     813  } 
     814 
     815   public static void copyNamedElement(Element to, Element from, String elem_name) { 
    811816       
    812817      Document to_doc = to.getOwnerDocument(); 
     
    940945    } 
    941946 
     947  public static void addParameterToList(Element param_list, String name, String value) { 
     948    Element p = createParameter(param_list.getOwnerDocument(), name, value); 
     949    param_list.appendChild(p); 
     950  } 
    942951    public static void addParametersToList(Element param_list, HashMap params) 
    943952    {