Hi,

I want to generate SAX events from DOM without using any proprietary
stuff, and this is the way I found to do it:

Source source = new DOMSource(doc);
SAXResult result = new SAXResult(handler);
Transformer xformer = TransformerFactory.newInstance().newTransformer();
xformer.transform(source, result);

Can some confirm if this is the best way to do it? and 
How do I ignore the the whitespaces in DOM? - Do I need to set any
property on the Transformer?

Thanks in advance,
Vivek.

Reply via email to