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 2006/11/15 19:39:16 UTC

svn commit: r475350 - /xalan/java/trunk/src/org/apache/xml/serializer/DOMSerializer.java

Author: minchau
Date: Wed Nov 15 10:39:15 2006
New Revision: 475350

URL: http://svn.apache.org/viewvc?view=rev&rev=475350
Log:
Javadoc update, just to make the example clearer.

Modified:
    xalan/java/trunk/src/org/apache/xml/serializer/DOMSerializer.java

Modified: xalan/java/trunk/src/org/apache/xml/serializer/DOMSerializer.java
URL: http://svn.apache.org/viewvc/xalan/java/trunk/src/org/apache/xml/serializer/DOMSerializer.java?view=diff&rev=475350&r1=475349&r2=475350
==============================================================================
--- xalan/java/trunk/src/org/apache/xml/serializer/DOMSerializer.java (original)
+++ xalan/java/trunk/src/org/apache/xml/serializer/DOMSerializer.java Wed Nov 15 10:39:15 2006
@@ -28,24 +28,32 @@
  * Interface for a DOM serializer implementation.
  * <p>
  * The DOMSerializer is a facet of a serializer and is obtained from the
- * asDOMSerializer() method of the Serializer interface. 
+ * asDOMSerializer() method of the ({@link Serializer}) interface. 
  * A serializer may or may not support a DOM serializer, if it does not then the 
  * return value from asDOMSerializer() is null.
  * <p>
  * Example:
  * <pre>
- * Document     doc;
- * Serializer   ser;
- * OutputStream os;
+ * // Create a document to be serialized
+ * org.w3c.dom.Document doc = ...;
  * 
- * ser = ...;
- * os = ...;
+ * // Create a Serializer that will be used
+ * // to serialize the document  
+ * org.apache.xml.serializer.Serializer ser = ...;
  *
- * ser.setOutputStream( os );
+ * // Set the Writer to write output to, and 
+ * // serialize the DOM using that Serializer
+ * java.io.StringWriter sw = new java.io.StringWriter();
+ * ser.setWriter(sw);
  * DOMSerialzier dser = ser.asDOMSerializer();
  * dser.serialize(doc);
+ * 
+ * // Write out the serialized XML in the String.
+ * System.out.println(sw.toString());
  * </pre>
  * 
+ * @see OutputPropertiesFactory
+ * @see SerializerFactory
  * @see Serializer
  * 
  * @xsl.usage general



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