You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by David Deininger <Da...@Bridge-Point.com> on 2001/02/07 21:29:00 UTC

intenting serialized DOM tree

Hello all,

I've been attempting to serialize a DOM tree as described by the 
"Serializing output" section of the xalan usage patterns document. 
Serialization is working fine, but I can't seem to get indentation to work.

Here's my Java code:

   TransformerFactory tf = TransformerFactory.newInstance();
   Transformer transformer = tf.newTransformer();

   Properties p = new Properties();
   p.put( "method", "html" );
   p.put( "indent-amount", "4" );
   transformer.setOutputProperties( p );

   transformer.transform( new DOMSource( document ), new StreamResult( 
writer ) );

What am I missing? I tried to follow the trax example code.

         --david