Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 245
  • Last Modified:

JSP with XML

I want to run through the XML file in my jsp file.
WHich way is better?JDOm or SAX?
In which case JDom should be used and In which case SAX?
Any example of creating XML file with a Database Query?
0
monasanjay
Asked:
monasanjay
1 Solution
 
cheekycjCommented:
IMHO, DOM is easier than sax.

I downloaded JDOM and was parsing xml in minutes.

if you want to create an xml file from a query just store each column as an element and store the groupings as a list of elements in the xml file.

a good article on coverting relational database to xml (though you are not doing that it will give you a good idea on how to map tables/columns to xml)

CJ
0
 
kennethxuCommented:
>> In which case JDom should be used and In which case SAX?
DOM load entire xml into memory, SAX is event driven.
DOM is easiler to use, it's good for small xml files.
SAX is more efficient and requires much less system resource. it can handle large xml files.

HTH
0
 
girionisCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points to kennethxu

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

girionis
EE Cleanup Volunteer
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now