|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--jwo.vfc.hub.XMLProcessor
Class for reading, processing and writing XML files storing spatial metadata. Includes some modified sections of the 'DOMWriter' code supplied with IBM's xml4Java package.
Field Summary | |
protected String |
errorMessage
Last error message. |
protected boolean |
errors
Records whether any errors have occurred. |
Constructor Summary | |
XMLProcessor()
Creates a default structured document. |
|
XMLProcessor(String xmlFile)
Creates a structured document from the given XML file. |
Method Summary | |
void |
createDefault()
Creates a default document object model. |
void |
error(SAXParseException e)
Handles error messages generated by the xml parser. |
void |
fatalError(SAXParseException e)
Handles error messages generated by the xml parser. |
Document |
getDOM()
Reports the Document Object Model (DOM) currently stored in this class. |
String |
getErrorMessage()
Reports any error messages associated with XML creation or DOM parsing. |
boolean |
hasErrors()
Reports whether any errors have occurred in creating the DOM. |
boolean |
readXML(String fileName)
Reads a given XML file and stores the structured information. |
boolean |
validateDOM()
Validates the entire DOM. |
void |
warning(SAXParseException e)
Handles warning messages generated by the xml parser. |
String |
writeXML()
Converts the structured information stored within this class into XML text. |
boolean |
writeXML(String fileName)
Converts the structured information stored within this class into an XML file. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean errors
protected String errorMessage
Constructor Detail |
public XMLProcessor()
public XMLProcessor(String xmlFile)
xmlFile
- XML file to read and process.Method Detail |
public void createDefault()
public Document getDOM()
public boolean readXML(String fileName)
fileName
- Name of XML file to read.
public boolean writeXML(String fileName)
fileName
- Name of file to contain the XML.
public String writeXML()
public boolean validateDOM()
public boolean hasErrors()
public String getErrorMessage()
public void warning(SAXParseException e)
warning
in interface ErrorHandler
e
- Parser warning.public void error(SAXParseException e)
error
in interface ErrorHandler
e
- Parser error.public void fatalError(SAXParseException e)
fatalError
in interface ErrorHandler
e
- Parser error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |