Hi,

I was trying to write OMElement to xml file. what I did is call OMElements'
toString method to write it into a xml, which eventually ended up creating
xml file content with single line.
following is my code.

BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(new
File(filePath,eventSink.getName()+".xml")));
bufferedWriter.write((OMElement).toString());

Is there anyway to write xml with correct indentations and formatting?




-- 
Vijitha Ekanayake
Software Engineer*, *WSO2, Inc.; http://wso2.com/
Mobile : +94 777 24 73 39 | +94 718 74 44 08
lean.enterprise.middleware
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to