I have two xml files. One contains all the information about courses of a department and the other contains class time, exam time, labs etc of each courses.

The first file remains fixed i.e it's never changed (A department rarely changes it's courses). But the other one changes every semester (not all the courses of the first file are offered every semester). The common thing about both files is that both have course id.

Now I need a way to display information about the offered courses (from the second file) taking some of the information from the first file.

Take a look at this :

FILE ONE :


<course>
<id>CE 201</id>
<name>Electrical Engineering</name>
<credit>4.0</credit>
</course>

<course>
<id>CE 202</id>
<name>Electronics</name>
<credit>4.0</credit>
</course>

<course>
<id>CE 301</id>
<name>Numerical Analysis</name>
<credit>3.0</credit>
</course>

----------------------------------------------------


FILE 2 :

<course>
<id>CE 202</id>
<day>Sunday</day>
----------------------------------------------------


A java code will parse the files - match course ids and display :

Course ID : CE 202 [Matching Key]
Course Name : Electronics [First File]
Day : Sunday [Second File]
----------------------------------------------------

I'm using the following two links.

http://www.developertutorials.com/tu...611/page1.html

http://www.w3schools.com/xml/tryit.a...catalog_island

The first link is to create objects (for other stuff) and the second one is to display the schedule in a tabular format.

Can anyone tell me how I can integrate these two files to create the tabular view of the second link and create objects of only those courses that're offered in the "Second XML FILE".