You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Max Bowsher <ma...@ukf.net> on 2007/05/20 13:41:35 UTC

Deprecation of org.apache.xml.serialize - migration path for producing pretty-printed XML?

Currently I have some code which uses org.apache.xml.serialize to
convert SAX events into nicely-indented XML output.  Having recently
noticed that that package is deprecated, I can't see any obvious
migration path, as I cannot figure out how to get the JAXP
transformation APIs to produce indented output.

Could someone point me in the right direction?

Thanks,
Max.


Re: Deprecation of org.apache.xml.serialize - migration path for producing pretty-printed XML?

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Max,

Max Bowsher <ma...@ukf.net> wrote on 05/20/2007 07:41:35 AM:

> Currently I have some code which uses org.apache.xml.serialize to
> convert SAX events into nicely-indented XML output.  Having recently
> noticed that that package is deprecated, I can't see any obvious
> migration path, as I cannot figure out how to get the JAXP
> transformation APIs to produce indented output.
> 
> Could someone point me in the right direction?

You're probably looking for OutputKeys.INDENT [1]. You can set this as an 
output property of a Transformer / TransformerHandler.

> Thanks,
> Max.

[1] 
http://xerces.apache.org/xerces2-j/javadocs/api/javax/xml/transform/OutputKeys.html#INDENT

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org