Package edu.pdx.cs410J.grader.gradebook
Class XmlDumper
java.lang.Object
edu.pdx.cs410J.grader.gradebook.XmlHelper
edu.pdx.cs410J.grader.gradebook.XmlDumper
- All Implemented Interfaces:
EntityResolver
,ErrorHandler
This class dumps the contents of a
GradeBook
to an XML
file. By default, the students in the grade book are dumped to XML
files in the same directory as the grade book's XML file.- Since:
- Fall 2000
- Author:
- David Whitlock
-
Field Summary
Fields inherited from class edu.pdx.cs410J.grader.gradebook.XmlHelper
DATE_TIME_FORMAT, publicID, systemID
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Dumps the contents of aGradeBook
in XML format.(package private) static Document
dumpGradeBook
(GradeBook book, XmlHelper helper) void
setStudentDir
(File dir) Sets the directory in which the XML files for students are generated.static Document
Returns a DOM tree that represents aStudent
Methods inherited from class edu.pdx.cs410J.grader.gradebook.XmlHelper
error, extractNotesFrom, extractTextFrom, fatalError, getBytesForXmlDocument, resolveEntity, warning, writeXmlToPrintWriter
-
Field Details
-
pw
-
-
Constructor Details
-
XmlDumper
Creates a newXmlDumper
that dumps the contents of a grade book to a given file.- Throws:
IOException
-
XmlDumper
Creates a newXmlDumper
that dumps the contents of a grade book to a file of the given name.- Throws:
IOException
-
-
Method Details
-
setStudentDir
Sets the directory in which the XML files for students are generated. -
dump
Dumps the contents of aGradeBook
in XML format.- Throws:
IOException
-
dumpGradeBook
-
toXml
Returns a DOM tree that represents aStudent
-