7 Replies Latest reply: Jan 10, 2013 5:47 AM by BIJ001 RSS

    How to append new data into xml file using Stax Parser.

    Ajay Sharma
      Hi,

      I have One xml file created where I am storing client information. When a new client storing information I want to append his/her details under root tag.

      Here is my XML File.
      <?xml version='1.0' encoding='UTF-8'?>
      <Clients>
           <Wipro>
                <City>Mumbai</Age>
                <Contact>5425565</Contact>
          </Wipro>
      </Clients>
      When New user enter data I want to xml file as :
      <?xml version='1.0' encoding='UTF-8'?>
      <Clients>
           <Wipro>
                <City>Mumbai</Age>
                <Contact>5425565</Contact>
          </Wipro>
      
          <TCS>
                   <City>Pune</Age>
                  <Contact>9856378762</Contact>
         </TCS>
      
      </Clients>
      How to achieve this.


      Regards,
      Ajay Sharma

      Edited by: Ajay Sharma on Jan 3, 2013 5:26 PM