[jdom-interest] writing XML to a String

Cameron Smith cameron.smith at entranet.co.uk
Wed Aug 30 05:56:27 PDT 2000


I wanted to use XMLOutputter to output a Document to a String/StringBuffer,
which would then be wrapped up in a larger message by another system
component and sent off somewhere.

Unfortunately output() can only use a print stream, and java.io only
provides a StringWriter and no OutputStream -> Writer class.  I have a
feeling I'm missing something obvious - anyone have a suggestion?

Alternatively, does the latest cvs build now have an output(Writer) method?
(I know the javadocs aren't totally in sync with builds).

cheers

	Cameron Smith, Software Developer
	Entranet Ltd

	Email:   cameron.smith at entranet.co.uk	
	Tel:      44 (0) 131 200 6222
Fax:      44 (0) 131 200 6200

----------------------------------------------------------------------------
------
This information is confidential and must not be copied, used or 
	disclosed without Entranet's prior written consent. If you have 
	received this information in error please notify the system
	manager immediately.
	 
	Entranet - creators of online commerce
	http://www.entranet.co.uk

	Entranet Limited
        Registered office - 2 Apsley Way London, NW2 7LF
	Registered in England No. 3267855
 
----------------------------------------------------------------------------
-------




More information about the jdom-interest mailing list