cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r639126 - /incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
Date Thu, 20 Mar 2008 03:03:20 GMT
Author: dkulp
Date: Wed Mar 19 20:03:17 2008
New Revision: 639126

URL: http://svn.apache.org/viewvc?rev=639126&view=rev
Log:
Fix constructor to not build factories everytime and use the shared one

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java?rev=639126&r1=639125&r2=639126&view=diff
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/W3CDOMStreamWriter.java
Wed Mar 19 20:03:17 2008
@@ -24,7 +24,6 @@
 
 import javax.xml.namespace.NamespaceContext;
 import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
 import javax.xml.parsers.ParserConfigurationException;
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
@@ -33,6 +32,8 @@
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
+import org.apache.cxf.helpers.XMLUtils;
+
 public class W3CDOMStreamWriter implements XMLStreamWriter {
     static final String XML_NS = "http://www.w3.org/2000/xmlns/";
     private Stack<Element> stack = new Stack<Element>();
@@ -42,9 +43,7 @@
     private Map properties = Collections.EMPTY_MAP;
 
     public W3CDOMStreamWriter() throws ParserConfigurationException {
-        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
-        factory.setNamespaceAware(true);
-        document = factory.newDocumentBuilder().newDocument();
+        document = XMLUtils.newDocument();
     }
 
     public W3CDOMStreamWriter(DocumentBuilder builder) {



Mime
View raw message