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 Editing an xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Editing an xml" Watch "Editing an xml" New topic
Author

Editing an xml

shalini gnana
Ranch Hand

Joined: Sep 18, 2007
Posts: 189
I have to edit an xml(only specified attributes) based on the output from
the applet..so how can i do it...Either by using dom/sax/xpath?
shalini gnana
Ranch Hand

Joined: Sep 18, 2007
Posts: 189
*How to edit the attribute of the element in an existing xml in java*...Anyone help me,please...
[ March 11, 2008: Message edited by: shalini gnana ]
Anuradha Karunamuni
Ranch Hand

Joined: Dec 08, 2007
Posts: 64
I have done this using DOM, but I am not an expert on this subject. Anyway I'll try to help you. Can you please tell what exactly needs to be done in detail.


"Simplicity is the ultimate sophistication..." ~Leonardo da Vinci~
SCJP 1.4
amulya gudapati
Greenhorn

Joined: Feb 27, 2008
Posts: 5
This can be done using DOM or SAX parsing
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39547
    
  27
SAX is just for parsing XML - you can't use it to change XML (unless you want to write code that recreates the complete XML file).

DOM can be used, as could any of the other XML object models (XOM, JDOM, dom4j). See e534 to e538 for examples of how to work with attributes in DOM. See this for how to obtain a DOM Document from an XML file in the first place.


Ping & DNS - updated with new look and Ping home screen widget
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Editing an xml
 
Similar Threads
Where to place the XML Schema
XML and SOAP Attachment
XML Parsers
Total no. of questions
SCBCD Kathy's Book