|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.pdx.cs399J.family.XmlDumper
public class XmlDumper
This class dumps a family tree to a destination (for example, a
file) in XML format. This file is meant to be used by an
XmlParser to create a FamilyTree.
| Field Summary | |
|---|---|
protected static String |
publicID
The Public ID for the Family Tree DTD |
protected static String |
systemID
The System ID for the Family Tree DTD |
| Constructor Summary | |
|---|---|
XmlDumper(File file)
Creates a new XML dumper that dumps to a given file. |
|
XmlDumper(PrintWriter pw)
Creates a new XML dumper that prints to a PrintWriter. |
|
XmlDumper(String fileName)
Creates a new XML dumper that dumps to a file of a given name. |
|
| Method Summary | |
|---|---|
void |
dump(FamilyTree tree)
Dumps the contents of a family tree to the desired destination. |
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)
|
static void |
main(String[] args)
Test program. |
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 |
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(String fileName)
throws IOException
IOException
public XmlDumper(File file)
throws IOException
IOExceptionpublic XmlDumper(PrintWriter pw)
PrintWriter. This way, we can dump to destinations
other than files.
| Method Detail |
|---|
public void dump(FamilyTree tree)
dump in interface DumperFamilyTreeException - An error occurred while dumping the family treepublic static void main(String[] args)
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 | |||||||||