- Timestamp:
- 2006-01-17T10:31:10+13:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r10556 r11046 258 258 Document document = null; 259 259 260 // If something has gone horribly wrong then xml will be empty. 261 if(xml.length() > 0) { 262 try { 263 // Then read the xml from the piped input stream. 264 StringReader xml_sr = new StringReader(xml.toString()); 265 InputSource source = new InputSource(xml_sr); 266 DOMParser parser = new DOMParser(); 267 parser.parse(source); 268 document = parser.getDocument(); 269 } 270 catch (Exception error) { 271 System.err.println("Failed when trying to parse XML stream "); 272 error.printStackTrace(); 273 } 274 } 275 else { 276 //DebugStream.println("Zero length argument xml detected for: " + form); 277 String[] margs = new String[1]; 278 margs[0] = form; 279 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.PlugInManager.PlugIn_XML_Parse_Failed", margs), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE); // !! TO DO: This is bad -- this function is used for more than just plugins 260 try { 261 // Read the xml from the piped input stream. 262 StringReader xml_sr = new StringReader(xml.toString()); 263 InputSource source = new InputSource(xml_sr); 264 DOMParser parser = new DOMParser(); 265 parser.parse(source); 266 document = parser.getDocument(); 267 } 268 catch (Exception error) { 269 System.err.println("Failed when trying to parse XML stream "); 270 error.printStackTrace(); 280 271 } 281 272
Note:
See TracChangeset
for help on using the changeset viewer.