You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2003/04/17 17:36:52 UTC
cvs commit: xml-axis/java/src/org/apache/axis/utils XMLUtils.java
gdaniels 2003/04/17 08:36:52
Modified: java/src/org/apache/axis/utils XMLUtils.java
Log:
Fix bug #19008.
Revision Changes Path
1.78 +5 -1 xml-axis/java/src/org/apache/axis/utils/XMLUtils.java
Index: XMLUtils.java
===================================================================
RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/utils/XMLUtils.java,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -r1.77 -r1.78
--- XMLUtils.java 30 Dec 2002 06:34:48 -0000 1.77
+++ XMLUtils.java 17 Apr 2003 15:36:52 -0000 1.78
@@ -648,7 +648,11 @@
return ((SAXSource) source).getInputSource();
} else if (source instanceof DOMSource) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
- Element domElement = (Element)((DOMSource)source).getNode();
+ Node node = ((DOMSource)source).getNode();
+ if (node instanceof Document) {
+ node = ((Document)node).getDocumentElement();
+ }
+ Element domElement = (Element)node;
PrettyElementToStream(domElement, baos);
InputSource isource = new InputSource(source.getSystemId());
isource.setByteStream(new ByteArrayInputStream(baos.toByteArray()));