aspose file tools
The moose likes XML and Related Technologies and the fly likes merge input back to xml file 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 "merge input back to xml file" Watch "merge input back to xml file" New topic
Author

merge input back to xml file

Holmes Wong
Ranch Hand

Joined: Feb 18, 2002
Posts: 163
Hi,

I am transforming xml file into a html file, after get user input,
I try to merge user input to the original xml file. Instead of
scanning xml file and locating tags (nasty coding), is there a better
way to do it?
I am using xerces+sax. Is there a way like: build a tree for xml file,
add new nodes (input) to the tree, and transform it back to xml file
with added content?
thanks
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12269
    
    1
What you are describing is processing with the DOM - Document Object Model (tree) in which the entire XML document resides in memory and can be directly manipulated. The programming style is completely different from SAX but can be done with the same Xerces library or the classes built into Java 1.4.
Bill


Java Resources at www.wbrogden.com
Holmes Wong
Ranch Hand

Joined: Feb 18, 2002
Posts: 163
Originally posted by William Brogden:
What you are describing is processing with the DOM - Document Object Model (tree) in which the entire XML document resides in memory and can be directly manipulated. The programming style is completely different from SAX but can be done with the same Xerces library or the classes built into Java 1.4.
Bill

Thanks, bill for your reply.
Gonna research about it.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: merge input back to xml file
 
Similar Threads
DOM Parser
treegrid dojo with xml
Reading File
A user-friendly XML editor
Struts 2 forms with different actions