use serializer.

public static String getXmlString(Document d) {
try {
         OutputFormat format  = new OutputFormat(d);
         strResponse = new StringWriter();
         XMLSerializer serial = new XMLSerializer( strResponse, format );
         serial.asDOMSerializer();
         serial.serialize(d.getDocumentElement());
      }
      catch (Exception e) {

         Logger.log("Problem occured while converting DOM to String " +
e.getMessage(),Logger.ERROR);
      
      }

      
      return strResponse.toString();

cheers
vasanth

-----Original Message-----
From: Peter Vanopulos [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 30, 2003 4:13 AM
To: [EMAIL PROTECTED]
Subject: RE: multiple attributes


Hi Group,

Quick question... What is the best way to go from a Document to a
String. 

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

This e-mail may contain confidential or privileged information.  If you
think you have received this e-mail in error, please advise the sender by
reply e-mail and then delete this e-mail immediately.  Thank you.  Aetna

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to