-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi!

> Hello,
>
> Anybody have ideas to convert
> DOM Tree object to any Java Objects( File ) or "InputStream"?

Anything like this?:

//Write a XML DOM tree to a File.
public static void writeXmlFile(Document doc, String filename) {
        try {
            // Prepare the DOM document for writing
            Source source = new DOMSource(doc);

            // Prepare the output file
            File file = new File(filename);
            Result result = new StreamResult(file);

            // Write the DOM document to the file
            Transformer xformer = 
TransformerFactory.newInstance().newTransformer();
            xformer.transform(source, result);
        } catch (TransformerConfigurationException e) {
        } catch (TransformerException e) {
        }
}

I didn't has time to probe this code, but compiled and looks fine ;-)

> Thanks in Advance,
> Shanakr

Regards,
Ignacio.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9fO/IkC21d1l2YQURAmhIAKCzhfDZmrS3HPzV/6OTKzf+flOm6wCgrsxT
dzaeXcRzHO+BXv9myM3OZdA=
=Q3e0
-----END PGP SIGNATURE-----

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to