src/java.xml.crypto/share/classes/com/sun/org/apache/xml/internal/security/c14n/CanonicalizerSpi.java
equal
deleted
inserted
replaced
23 package com.sun.org.apache.xml.internal.security.c14n; |
23 package com.sun.org.apache.xml.internal.security.c14n; |
24 |
24 |
25 import java.io.ByteArrayInputStream; |
25 import java.io.ByteArrayInputStream; |
26 import java.io.OutputStream; |
26 import java.io.OutputStream; |
27 import java.util.Set; |
27 import java.util.Set; |
28 |
|
29 import javax.xml.parsers.DocumentBuilder; |
|
30 |
28 |
31 import com.sun.org.apache.xml.internal.security.utils.XMLUtils; |
29 import com.sun.org.apache.xml.internal.security.utils.XMLUtils; |
32 import org.w3c.dom.Document; |
30 import org.w3c.dom.Document; |
33 import org.w3c.dom.Node; |
31 import org.w3c.dom.Node; |
34 import org.w3c.dom.NodeList; |
32 import org.w3c.dom.NodeList; |
61 |
59 |
62 Document document = null; |
60 Document document = null; |
63 try (java.io.InputStream bais = new ByteArrayInputStream(inputBytes)) { |
61 try (java.io.InputStream bais = new ByteArrayInputStream(inputBytes)) { |
64 InputSource in = new InputSource(bais); |
62 InputSource in = new InputSource(bais); |
65 |
63 |
66 DocumentBuilder db = XMLUtils.createDocumentBuilder(false, secureValidation); |
64 document = XMLUtils.read(in, secureValidation); |
67 |
|
68 document = db.parse(in); |
|
69 } |
65 } |
70 return this.engineCanonicalizeSubTree(document); |
66 return this.engineCanonicalizeSubTree(document); |
71 } |
67 } |
72 |
68 |
73 /** |
69 /** |