axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdani...@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/utils XMLUtils.java
Date Thu, 17 Apr 2003 15:36:52 GMT
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()));
  
  
  

Mime
View raw message