|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.grader.XmlDumper
public class XmlDumper
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.
| Field Summary | |
|---|---|
protected static String |
publicID
The Public ID for the Grade Bookd DTD |
protected static String |
systemID
The System ID for the Grade Book DTD |
| Constructor Summary | |
|---|---|
XmlDumper(File xmlFile)
Creates a new XmlDumper that dumps the contents of a
grade book to a given file. |
|
XmlDumper(String xmlFileName)
Creates a new XmlDumper that dumps the contents of a
grade book to a file of the given name. |
|
| Method Summary | |
|---|---|
void |
dump(GradeBook book)
Dumps the contents of a GradeBook in XML format. |
void |
error(SAXParseException ex)
|
protected static List<String> |
extractNotesFrom(Element element)
Extracts a bunch of notes from an Element |
protected static String |
extractTextFrom(Element element)
Extracts the text from an Element. |
void |
fatalError(SAXParseException ex)
|
InputSource |
resolveEntity(String publicId,
String systemId)
Attempt to resolve the external entity (such as a DTD) described by the given public and system ID. |
void |
setStudentDir(File dir)
Sets the directory in which the XML files for students are generated. |
void |
warning(SAXParseException ex)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String systemID
protected static final String publicID
| Constructor Detail |
|---|
public XmlDumper(File xmlFile)
throws IOException
XmlDumper that dumps the contents of a
grade book to a given file.
IOException
public XmlDumper(String xmlFileName)
throws IOException
XmlDumper that dumps the contents of a
grade book to a file of the given name.
IOException| Method Detail |
|---|
public void setStudentDir(File dir)
public void dump(GradeBook book)
throws IOException
GradeBook in XML format.
IOException
public InputSource resolveEntity(String publicId,
String systemId)
throws SAXException,
IOException
InputSource
resolveEntity in interface EntityResolverSAXException
IOException
public void warning(SAXParseException ex)
throws SAXException
warning in interface ErrorHandlerSAXException
public void error(SAXParseException ex)
throws SAXException
error in interface ErrorHandlerSAXException
public void fatalError(SAXParseException ex)
throws SAXException
fatalError in interface ErrorHandlerSAXExceptionprotected static List<String> extractNotesFrom(Element element)
Element
protected static String extractTextFrom(Element element)
Element.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||