Changeset 18307

Show
Ignore:
Timestamp:
05.01.2009 21:18:33 (10 years ago)
Author:
kjdon
Message:

made the getString and getPrettyString methods static so I can use them from XSLTUtil

Files:
1 modified

Legend:

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

    r16999 r18307  
    4747 * now we only use xerces 
    4848 * 
    49  * @author <a href="mailto:kjdon@cs.waikato.ac.nz">Katherine Don</a> 
    50  * @version $Revision$ 
    51  * 
    5249 */ 
    5350public class XMLConverter { 
     
    5855    protected DOMParser parser = null; 
    5956 
    60     private boolean outputEscaping = true; 
     57    private static boolean outputEscaping = true; 
    6158 
    6259 
     
    162159 
    163160    /** creates a new empty DOM Document */ 
    164     public Document newDOM() { 
     161    public static Document newDOM() { 
    165162    Document doc = new DocumentImpl();  
    166163    return doc; 
     
    168165 
    169166    /** returns the Node as a String */ 
    170     public String getString(Node xmlNode) 
     167    public static String getString(Node xmlNode) 
    171168    { 
    172169    outputEscaping = true; 
     
    179176     * text nodes if the String is read back in as a DOM, so should only be  
    180177     * used for printing */ 
    181     public String getPrettyString(Node xmlNode) { 
     178    public static String getPrettyString(Node xmlNode) { 
    182179     
    183180    outputEscaping = true; 
     
    187184    } 
    188185 
    189     private void getString(Node xmlNode, StringBuffer xmlRepresentation,  
     186    private static void getString(Node xmlNode, StringBuffer xmlRepresentation,  
    190187                 int depth, boolean pretty) 
    191188    {