Mercurial > dive4elements > river
comparison flys-aft/src/main/java/de/intevation/utils/XML.java @ 4072:88f801888d85
load configuration an setup db connections.
flys-aft/trunk@3401 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 13 Dec 2011 12:33:36 +0000 |
parents | d09adfa90942 |
children | 44dc38ca8492 |
comparison
equal
deleted
inserted
replaced
4071:0f5cc88a0f74 | 4072:88f801888d85 |
---|---|
67 * @param file The file to load. | 67 * @param file The file to load. |
68 * @return the XML document or null if something went wrong | 68 * @return the XML document or null if something went wrong |
69 * during loading. | 69 * during loading. |
70 */ | 70 */ |
71 public static final Document parseDocument(File file) { | 71 public static final Document parseDocument(File file) { |
72 return parseDocument(file, Boolean.TRUE); | |
73 } | |
74 | |
75 public static final Document parseDocument(File file, Boolean namespaceAware) { | |
72 InputStream inputStream = null; | 76 InputStream inputStream = null; |
73 try { | 77 try { |
74 inputStream = new BufferedInputStream(new FileInputStream(file)); | 78 inputStream = new BufferedInputStream(new FileInputStream(file)); |
75 return parseDocument(inputStream); | 79 return parseDocument(inputStream, namespaceAware); |
76 } | 80 } |
77 catch (IOException ioe) { | 81 catch (IOException ioe) { |
78 log.error(ioe.getLocalizedMessage(), ioe); | 82 log.error(ioe.getLocalizedMessage(), ioe); |
79 } | 83 } |
80 finally { | 84 finally { |