• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SAX and DOM parser

 
neha priya
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I need to know which one of DOM or SAX parser is better?I need to generate a new xml file from an existing xml template on server.

Kindly help.

Regards.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I had an assignment like that ("generate one XML file from another XML file") then the first tool I would consider would be XSLT. I wouldn't consider low-level tools like SAX and DOM parsers until I was sure that XSLT couldn't do the job.
 
neha priya
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply.In my case i have a xml template on the server.I need to collect data across various jsp pages and create a new xml file based on the xml template and populate the collected data over there.At the end of this, the template xml should remain as it was before.How do i use XSLT as you mentioned to achieve the same.
Kindly Help.

Regards.
 
Paul Clapham
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have no idea. It would depend on what data you were collecting and how much of it there was and how it was structured. If you're going to do this kind of evaluation you have to produce a proper set of requirements.
 
Jimmy Clark
Ranch Hand
Posts: 2187
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I had an assignment like that ("generate one XML file from another XML file") then the first tool I would consider would be Perl. I wouldn't consider XSLT because of it's awkward programming style and inability to store program data efficiently. Moreover, the pattern-matching features of Perl are very powerful and flexible.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic