Hi, Raju!

Instead of using a FileOutputStream you could use a
ByteArrayOutputStream:
        
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        serializer.setOutputStream(out);
        ...             
        out.flush();
        out.close();
        System.out.println("xml string is " + out.toString());
        
Bye, 
Harald
-- 
Harald Hett <[EMAIL PROTECTED]>
Gesellschaft f�r integrierte Systemplanung



Raju Vaidya wrote:
> 
> Hi all,
> 
> I am new in using xalan.
> 
> I am using xalan-j for a corba project. i am sending 'xml' from client to
> server and vice versa as String. therefore is it possible to convert dom
> object to String using 'serializer' or something else. and is it possible to
> converted this 'String' representing xml doc to dom?
> 
> i can save use SerializerFactory to dom object and save it to a file using
> serializer.setOutputStream(new FileOutputStream("filename.xml"));
> i can read the file and save it it string. it would be better if i can copy
> to String directly.
> 
> I would be greatful if someone can help.
> 
> regards,
> R.N. Vaidya

Reply via email to