Re: [Dev] Write OMElement to xml with proper indentation

2014-11-18 Thread Vijitha Ekanayake
Hi Mohan,waruna, Thank a lot for the information. @mohan, I was able implement xml writer by going through XmlFormatter

Re: [Dev] Write OMElement to xml with proper indentation

2014-11-17 Thread Waruna Perera
Hi Vijitha, Pls see [1] if it helps. [1] http://stackoverflow.com/questions/2949203/formatting-xml-file-using-stax On Tue, Nov 18, 2014 at 10:04 AM, Mohanadarshan Vivekanandalingam < mo...@wso2.com> wrote: > Can you check the code in [1].. It will help you.. > > [1] > https://svn.wso2.org/repos

Re: [Dev] Write OMElement to xml with proper indentation

2014-11-17 Thread Mohanadarshan Vivekanandalingam
Can you check the code in [1].. It will help you.. [1] https://svn.wso2.org/repos/wso2/carbon/platform/branches/turing/components/event-stream/event-formatter/org.wso2.carbon.event.formatter.core/1.0.1/src/main/java/org/wso2/carbon/event/formatter/core/internal/util/helper/XmlFormatter.java Thank

[Dev] Write OMElement to xml with proper indentation

2014-11-17 Thread Vijitha Ekanayake
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,e