Changeset 12620
- Timestamp:
- 2006-08-30T16:59:00+12:00 (18 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r12249 r12620 335 335 336 336 if (xml.length() > 0) { 337 document = CollectionDesignManager.XMLStringToDOM(xml, classifier);337 document = XMLTools.parseXML(new StringReader(xml.toString())); 338 338 } 339 339 else { … … 426 426 private void loadClassifiers(StringBuffer xml) 427 427 { 428 Document document = CollectionDesignManager.XMLStringToDOM(xml, "-listall");428 Document document = XMLTools.parseXML(new StringReader(xml.toString())); 429 429 430 430 // Parse XML to build up list of classifier names -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r12140 r12620 229 229 230 230 231 static public Document XMLStringToDOM(StringBuffer xml, String form)232 {233 Document document = null;234 235 try {236 // Read the xml from the piped input stream.237 StringReader xml_sr = new StringReader(xml.toString());238 InputSource source = new InputSource(xml_sr);239 DOMParser parser = new DOMParser();240 parser.parse(source);241 document = parser.getDocument();242 }243 catch (Exception error) {244 System.err.println("Failed when trying to parse XML stream ");245 error.printStackTrace();246 }247 248 return document;249 }250 251 231 public static int getRebuildTypeRequired() { 252 232 return rebuildTypeRequired; -
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r12303 r12620 475 475 476 476 if (xml.length() > 0) { 477 document = CollectionDesignManager.XMLStringToDOM(xml, plugin);477 document = XMLTools.parseXML(new StringReader(xml.toString())); 478 478 } 479 479 else { … … 572 572 private void loadPlugins(StringBuffer xml) 573 573 { 574 Document document = CollectionDesignManager.XMLStringToDOM(xml, "-listall");574 Document document = XMLTools.parseXML(new StringReader(xml.toString())); 575 575 576 576 // Parse XML to build up list of plugin names -
trunk/gli/src/org/greenstone/gatherer/gui/DownloadPane.java
r12529 r12620 270 270 } 271 271 272 StringBuffer xml = Utility.readXMLStream(input_stream); 273 document = CollectionDesignManager.XMLStringToDOM(xml,download_name); 272 document = XMLTools.parseXML(input_stream); 274 273 } 275 274 catch (Exception error) {
Note:
See TracChangeset
for help on using the changeset viewer.