Changeset 8015 for trunk/gli/src/org/greenstone/gatherer/util
- Timestamp:
- 2004-08-20T13:59:02+12:00 (20 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/util
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/util/StaticStrings.java
r7545 r8015 37 37 static final public char FORWARDSLASH_CHAR = '/'; 38 38 static final public char NEW_LINE_CHAR = '\n'; 39 static final public char NS_SEP = '.'; 39 40 static final public char OPENBRACKET_CHAR = '['; 40 41 static final public char PIPE_CHAR = '|'; -
trunk/gli/src/org/greenstone/gatherer/util/XMLTools.java
r8014 r8015 13 13 public class XMLTools 14 14 { 15 /** Remove all of the child nodes from a certain node. */ 16 static final public void clear(Node node) 17 { 18 while (node.hasChildNodes()) { 19 node.removeChild(node.getFirstChild()); 20 } 21 } 22 23 15 24 static public ArrayList getChildElementsByTagName(Element parent_element, String element_name) 16 25 { … … 88 97 89 98 99 /** Set the #text node value of some element. 100 * @param element the Element whose value we wish to set 101 * @param value the new value for the element as a String 102 * Soon to be deprecated! 103 */ 104 static final public void setValue(Element element, String value) { 105 // Remove any existing child node(s) 106 clear(element); 107 // Add new text node. 108 if (value != null) { 109 element.appendChild(element.getOwnerDocument().createTextNode(value)); 110 } 111 } 112 113 90 114 /** Parse an XML document from a given file */ 91 115 static public Document parseXMLFile(File xml_file)
Note:
See TracChangeset
for help on using the changeset viewer.