Author: dkulp
Date: Tue Mar 30 20:35:34 2010
New Revision: 929261

URL: http://svn.apache.org/viewvc?rev=929261&view=rev
Log:
try to write a doctype in staxutils, may or may not work

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

Modified: 
cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
URL: 
http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=929261&r1=929260&r2=929261&view=diff
==============================================================================
--- 
cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java 
(original)
+++ 
cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java 
Tue Mar 30 20:35:34 2010
@@ -59,6 +59,7 @@ import org.w3c.dom.CDATASection;
 import org.w3c.dom.Comment;
 import org.w3c.dom.Document;
 import org.w3c.dom.DocumentFragment;
+import org.w3c.dom.DocumentType;
 import org.w3c.dom.Element;
 import org.w3c.dom.EntityReference;
 import org.w3c.dom.NamedNodeMap;
@@ -745,6 +746,14 @@ public final class StaxUtils {
             }
             break;
         }
+        case Node.DOCUMENT_TYPE_NODE:
+            try {
+                writer.writeDTD(((DocumentType)n).getTextContent());
+            } catch (UnsupportedOperationException ex) {
+                //can we ignore?  DOM writers really don't allow this
+                //as there isn't a way to write a DTD in dom
+            }
+            break;
         default:
             throw new IllegalStateException("Found type: " + 
n.getClass().getName());
         }        


Reply via email to