• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to insert data in xml file

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guys
I'm new to xml.As per requirement i've a xml file which contains some data as belows but i need to add data into the following xml file using java.can anyone please suggest me how to proceed.

out.xml
---------
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<tbl_sis_Products>
<product_id>1</product_id>
<product_code>LIP</product_code>
<product_name>Life Ins</product_name>
<product_description>Life Insurance Plan</product_description>
<is_active>true</is_active>
</tbl_sis_Products>
<tbl_sis_Products>
<product_id>2</product_id>
<product_code>REMCN</product_code>
<product_name>ExPIP</product_name>
<product_description>Professional Insurance Portfolio</product_description>
<is_active>true</is_active>
</tbl_sis_Products>
</NewDataSet>

Thanks in Advance....
 
Bartender
Posts: 2856
10
Firefox Browser Fedora Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Prince Point" please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are any number of APIs for altering XML files: DOM, XOM, JDOM, dom4j, ...
 
Sheriff
Posts: 22784
131
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving to our XML forum.
 
reply
    Bookmark Topic Watch Topic
  • New Topic