Is there any way to add entry into xml file by using parser program? (because DOM and SAX provides ways to reading a xml file...)
Please provide me the valuable suggestions to do this task.
i will be so greatful to u if u get me java code...
waiting for ur valuable response..
Thanks in advance.
posted 9 years ago
Welcome to JavaRanch.
On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it; specifically, a first name and a last name are required. Please adjust it accordingly, which you can do right here. Thanks for your prompt attention to this matter.
As to your question, "parsing" refers to reading XML, not generating it. SAX won't help you much with modifying XML, but using DOM this is easily possible. Here is an example program for reading an XML file and creating a DOM Document object, through which you can access the XML elements, add new ones, and save the result to a different file.