|
1 | 1 | package org.hl7.fhir.dstu3.utils;
|
2 | 2 |
|
3 |
| -/* |
4 |
| - Copyright (c) 2011+, HL7, Inc. |
5 |
| - All rights reserved. |
6 |
| - |
7 |
| - Redistribution and use in source and binary forms, with or without modification, |
8 |
| - are permitted provided that the following conditions are met: |
9 |
| - |
10 |
| - * Redistributions of source code must retain the above copyright notice, this |
11 |
| - list of conditions and the following disclaimer. |
12 |
| - * Redistributions in binary form must reproduce the above copyright notice, |
13 |
| - this list of conditions and the following disclaimer in the documentation |
14 |
| - and/or other materials provided with the distribution. |
15 |
| - * Neither the name of HL7 nor the names of its contributors may be used to |
16 |
| - endorse or promote products derived from this software without specific |
17 |
| - prior written permission. |
18 |
| - |
19 |
| - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
20 |
| - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
21 |
| - WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
22 |
| - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
23 |
| - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
24 |
| - NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
25 |
| - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
26 |
| - WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
27 |
| - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
28 |
| - POSSIBILITY OF SUCH DAMAGE. |
29 |
| - |
30 |
| - */ |
| 3 | +/* |
| 4 | + Copyright (c) 2011+, HL7, Inc. |
| 5 | + All rights reserved. |
| 6 | + |
| 7 | + Redistribution and use in source and binary forms, with or without modification, |
| 8 | + are permitted provided that the following conditions are met: |
| 9 | + |
| 10 | + * Redistributions of source code must retain the above copyright notice, this |
| 11 | + list of conditions and the following disclaimer. |
| 12 | + * Redistributions in binary form must reproduce the above copyright notice, |
| 13 | + this list of conditions and the following disclaimer in the documentation |
| 14 | + and/or other materials provided with the distribution. |
| 15 | + * Neither the name of HL7 nor the names of its contributors may be used to |
| 16 | + endorse or promote products derived from this software without specific |
| 17 | + prior written permission. |
| 18 | + |
| 19 | + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND |
| 20 | + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 21 | + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
| 22 | + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, |
| 23 | + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
| 24 | + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 25 | + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, |
| 26 | + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) |
| 27 | + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE |
| 28 | + POSSIBILITY OF SUCH DAMAGE. |
| 29 | + |
| 30 | + */ |
31 | 31 |
|
32 | 32 |
|
33 | 33 |
|
@@ -71,7 +71,7 @@ public void setLang(String lang) {
|
71 | 71 | * @throws Exception
|
72 | 72 | */
|
73 | 73 | public void load(String filename) throws FileNotFoundException, SAXException, IOException, ParserConfigurationException {
|
74 |
| - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); |
| 74 | + DocumentBuilderFactory factory = XMLUtil.newXXEProtectedDocumentBuilderFactory(); |
75 | 75 | DocumentBuilder builder = factory.newDocumentBuilder();
|
76 | 76 | loadMessages(builder.parse(new CSFileInputStream(filename)));
|
77 | 77 | }
|
|
0 commit comments