You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mi...@apache.org on 2004/05/03 17:22:28 UTC

cvs commit: xml-xalan/java/samples/DOM2DOM DOM2DOM.java

minchau     2004/05/03 08:22:28

  Modified:    java/samples/DOM2DOM DOM2DOM.java
  Log:
  Clean up related to bugzilla 24304.
  There is no longer a space after the XML header. To keep the output
  of this sample the same as before properties were set on the
  serializer (indent="yes" and standalone="no" ).
  
  Submitted by:	Brian Minchau
  Reviewed by:	Sarah McNamara
  
  Revision  Changes    Path
  1.9       +6 -4      xml-xalan/java/samples/DOM2DOM/DOM2DOM.java
  
  Index: DOM2DOM.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/samples/DOM2DOM/DOM2DOM.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DOM2DOM.java	17 Feb 2004 19:06:27 -0000	1.8
  +++ DOM2DOM.java	3 May 2004 15:22:28 -0000	1.9
  @@ -89,9 +89,11 @@
         transformer.transform(xmlDomSource, domResult);
   	  
   	    //Instantiate an Xalan XML serializer and use it to serialize the output DOM to System.out
  -	    // using a default output format.
  -      Serializer serializer = SerializerFactory.getSerializer
  -                             (OutputPropertiesFactory.getDefaultMethodProperties("xml"));
  +	    // using the default output format, except for indent="yes"
  +      java.util.Properties xmlProps = OutputPropertiesFactory.getDefaultMethodProperties("xml");
  +      xmlProps.setProperty("indent", "yes");
  +      xmlProps.setProperty("standalone", "no");
  +      Serializer serializer = SerializerFactory.getSerializer(xmlProps);                             
         serializer.setOutputStream(System.out);
         serializer.asDOMSerializer().serialize(domResult.getNode());
   	}
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org