Assignment 3 - XML Programming in Java
JDOM and SAX in Java
Consider the weblog
from the first assignments.
- Write a JDOM program that combines two weblogs (the filenames
given as arguments args[0] and args[1]) into
one (allowing entries with the same date).
- The program should test if the name, email and url are the same
for the two weblogs and only allow merging if so.
- You may assume that the two weblogs are sorted and try to keep
the order (but that is not required)
For instance, the result of
merging the weblog private.xml with
the weblog itu.xml should result in a
weblog with the same entries as the one above.
- Write a SAX program that for a given weblog (the filename given
as first argument args[0]) outputs the name, email and
url - and the first entry as text.
Guidelines for hand-in
Send an email with subject [IXMR] hand-in, group XY,
to your instructor, attached two files called:
jdomXY.java and saxXY.java, where XY is your group name.
Do not use any compression of the files.
The email should contain the command line expressions you used for
compiling and executing your two files (as in the lectures), and the
result of testing the two programs.
The solution must be received by your instructor no later than
Wednesday 20th of April, 12:00.
Thomas Hildebrandt