Changeset 21911

Show
Ignore:
Timestamp:
20.04.2010 10:43:49 (10 years ago)
Author:
xiao
Message:

added two constants for configure action results; added method createTextElement with attribute

Files:
1 modified

Legend:

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

    r21281 r21911  
    239239   public static final String USER_NODE_ELEM="userNode"; 
    240240 
     241   //for configure action results 
     242   public static final String SUCCESS = "success"; 
     243   public static final String ERROR = "error"; 
     244    
    241245  /** takes a list of elements, and returns an array of strings 
    242246   * of the values of attribute att_name */ 
     
    632636  } 
    633637   
     638  public static Element createTextElement(Document owner, String elem_name, 
     639            String text, String att_name, String att_value) { 
     640            Element e = owner.createElement(elem_name); 
     641            e.setAttribute(att_name, att_value); 
     642            Text t = owner.createTextNode(text); 
     643            e.appendChild(t); 
     644            return e; 
     645             
     646          } 
     647           
    634648  public static Element createDisplayTextElement(Document owner, 
    635649    String text_name,