File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes How to insert data in xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "How to insert data in xml file" Watch "How to insert data in xml file" New topic

How to insert data in xml file

Tuna Jen
Ranch Hand

Joined: Mar 18, 2009
Posts: 32
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.

<?xml version="1.0" standalone="yes"?>
<product_name>Life Ins</product_name>
<product_description>Life Insurance Plan</product_description>
<product_description>Professional Insurance Portfolio</product_description>

Thanks in Advance....
Amit Ghorpade

Joined: Jun 06, 2007
Posts: 2711

"Prince Point" please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.

|Asking Good Questions|
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39547
There are any number of APIs for altering XML files: DOM, XOM, JDOM, dom4j, ...

Ping & DNS - updated with new look and Ping home screen widget
Rob Spoor

Joined: Oct 27, 2005
Posts: 19541

Moving to our XML forum.

How To Ask Questions How To Answer Questions
I agree. Here's the link:
subject: How to insert data in xml file
Similar Threads
Customize Login Page Based on Url in J2ee Application
Unable to fetch data on a specific JSP....getting error "HTTP Status 404 - /"... help.
Parsing XML using DOM
How to convert from sql to xml
issue with special characters with sax parser