|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.a7soft.examxml.ExamXMLHandler
public class ExamXMLHandler
The ExamXML base class for SAX2 event handlers.
User: Yuri Kernogo Date: July 29, 2007 Time: 12:52:45 PM.
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Parser calls this for each text part in a document. |
void |
endDocument()
Parser calls this once after parsing a document. |
void |
endElement(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName)
Parser calls this for each element in a document. |
static ExamXMLHandler |
getInstance(java.lang.String logFile)
Creates if necessary and returns the instance of the ExamXMLHandler object. |
Element |
loadXML(org.xml.sax.InputSource source)
Loads the XML document and returns the root XML element. |
void |
setDocumentLocator(org.xml.sax.Locator loc)
Sets the XML document locator |
void |
setFeatures()
Sets the SAXParser features and properties. |
void |
startDocument()
Parser calls this once at the beginning of a document. |
void |
startElement(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
Parser calls this for each element in a document. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, skippedEntity, startPrefixMapping, unparsedEntityDecl, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ExamXMLHandler getInstance(java.lang.String logFile)
ExamXMLHandler object.
logFile - the log file name
ExamXMLHandler instancepublic void setFeatures()
SAXParser features and properties.
public Element loadXML(org.xml.sax.InputSource source)
source - the InputSource, containing the content to be parsed
Element of the XML document
public void startDocument()
throws org.xml.sax.SAXException
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException - if a parsing error occurs
public void endDocument()
throws org.xml.sax.SAXException
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException - if there is a parsing problem
public void startElement(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attrs)
throws org.xml.sax.SAXException
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandlernamespace - the namespace URIlocalName - the local name of the elementqName - the qualified name of the elementattrs - the attributes of the element
org.xml.sax.SAXException - if a parsing error occurs
public void characters(char[] ch,
int start,
int length)
throws org.xml.sax.SAXException
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandlerorg.xml.sax.SAXException
public void endElement(java.lang.String namespace,
java.lang.String localName,
java.lang.String qName)
throws org.xml.sax.SAXException
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlernamespace - the namespace URIlocalName - the local name of the elementqName - the qualified name of the element
org.xml.sax.SAXException - if a parsing error occurspublic void setDocumentLocator(org.xml.sax.Locator loc)
setDocumentLocator in interface org.xml.sax.ContentHandlersetDocumentLocator in class org.xml.sax.helpers.DefaultHandlerloc - Locator
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||