A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
Java in General
How to modify XML file in Java
Joined: May 29, 2008
May 28, 2009 01:07:32
i have a one xml file.
<?xml version="1.0"?> <company> <employee> <firstname>Tom</firstname> <lastname>Cruise</lastname> </employee> <employee> <firstname>Paul</firstname> <lastname>Enderson</lastname> </employee> <employee> <firstname>George</firstname> <lastname>Bush</lastname> </employee> </company>
and i want modify like Tom is Ram and Cruise is sundar using
is it possible or not?
Joined: Sep 11, 2006
May 28, 2009 01:43:41
Not an advanced question at all. Yeah, it's possible by the way.
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
Joined: Mar 22, 2005
May 28, 2009 01:54:34
There are any number of libraries/APIs you can use to modify XML files: DOM, XOM, dom4j, JDOM, ...
Have you checked out
subject: How to modify XML file in Java
XML file parsing in Java using SAX
below code is correct way to write the code in generic way if we receive different xml formats
Generating XML from template file.
Reading XML In Form Of Key-Value Pair
expandable multidimensional ArrayList or Multidimensional Arrays?
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015