Win a copy of Learning Regular Expressions this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

merge input back to xml file  RSS feed

 
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Holmes Wong
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!