File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes how can I update xml file in java? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Reply Bookmark "how can I update xml file in java?" Watch "how can I update xml file in java?" New topic
Author

how can I update xml file in java?

arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
I want to update a xml file in java..
like in sql update command is use for update table in database--
as an example--

update student
set marks ='30',status = 'present'

in this student is a table in mysql database whis have two attribute marks and status.And from given command both can be update..

Like that If database is in XML formate..Then If I want to update some attribute in java then how can we do this..

Please help me to get out of this problem..
Kumar Raja
Ranch Hand

Joined: Mar 18, 2010
Posts: 457

Arun,

I would be interested to know, if there is any easy way to do this. My approach would be rather to read the XML using JDOM (or other related technologies) and create an object representation and using setters I would manipulate the data and covert it back to XML file. But this may not be a good solution at all, if you have multiple updates like this.


Regards
KumarRaja

miki landon
Greenhorn

Joined: Sep 02, 2008
Posts: 5
Hi,

I wondered if you have foud any solutions yet?
Could you please share your solutions?


Thanks,
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: how can I update xml file in java?
 
Similar Threads
File Problem
using for:each in xsl
how to retrieve value of attribute of an xml element tag using jsp
How to update the xml tag attributes for the given tag
dbload command