Thanks!! I got it solved!! Was still missing something from the DTD and XML :
XML
Code:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE courses SYSTEM "http://" >
<courses>
<course> /// Was missing from each block
<department>Computer Science</department>
<course_name>Programming I</course_name>
<course_number>CS 3332</course_number>
<instructor>Vande Van</instructor>
<course_type lab="true" lecture="true">
<lab>false</lab>
<lecture>true</lecture>
</course_type>
<time>1pm</time>
<room>J-256</room>
</course>
<course>
<department>Computer Science</department>
<course_name>Programming II</course_name>
<course_number>CS 3333</course_number>
<instructor> Maxwell</instructor>
<course_type lab="true" lecture="true">
<lab>true</lab>
<lecture>false</lecture>
</course_type>
<time>3pm</time>
<room>J-260</room>
</course>
<course>
<department>Information Technology</department>
<course_name>Web Development</course_name>
<course_number>IT 3203</course_number>
<instructor> Brown</instructor>
<course_type lab="true" lecture="true">
<lab>true</lab>
<lecture>true</lecture>
</course_type>
<time>3pm</time>
<room>J-210</room>
</course>
</courses>
DTD
Code:
<!ELEMENT courses (course+)>///Was missing, allows duplicate entry
<!ELEMENT course (department, course_name, course_number, instructor, course_type, time,room)>
<!ELEMENT department (#PCDATA)>
<!ELEMENT course_name (#PCDATA)>
<!ELEMENT course_number (#PCDATA)>
<!ELEMENT instructor (#PCDATA)>
<!ELEMENT course_type (lab,lecture)>
<!ELEMENT lab (#PCDATA)>
<!ELEMENT lecture (#PCDATA)>
<!ELEMENT time (#PCDATA)>
<!ELEMENT room (#PCDATA)>
<!ATTLIST course_type lab CDATA "true | false">
<!ATTLIST course_type lecture CDATA "true | false">
The lab or lecture section is used to tell whether a class is a lab or lecture.