|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.HandlerBase net.firstpartners.rp.back.extractor.xml.SaxXMLBuilder
public class SaxXMLBuilder
XML Sax - builder
Field Summary | |
---|---|
private java.io.CharArrayWriter |
contents
Buffer for collecting data from the "characters" SAX event |
(package private) IXMLController |
controller
XML-Controller |
Constructor Summary | |
---|---|
SaxXMLBuilder(IXMLController control)
Creates a builder that forwards the SAX events to the given handler and use the specified controller to handle the tokens |
Method Summary | |
---|---|
void |
characters(char[] buf,
int start,
int length)
When the parser encounters plain text (not XML elements), it calls this method, which accumulates them in a string buffer |
void |
endDocument()
Calls the method with the same name of the handler object |
void |
endElement(java.lang.String name)
Calls the method with the same name of the handler object after calling the controller to handle the process content |
void |
error(org.xml.sax.SAXParseException exception)
This method is called when errors occur |
void |
fatalError(org.xml.sax.SAXParseException exception)
This method is called when non-recoverable errors occur |
void |
processingInstruction(java.lang.String target,
java.lang.String data)
Calls the method when processing instruction is read it |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Calls the method with the same name of the handler object passing the given locator as parameter. |
void |
startDocument()
Calls the method with the same name of the handler object |
void |
startElement(java.lang.String name,
org.xml.sax.AttributeList attributes)
Calls the method with the same name of the controller object or creates a DOM Element node depending on the value of the wantDOM flag. |
void |
warning(org.xml.sax.SAXParseException exception)
This method is called when warnings occur |
Methods inherited from class org.xml.sax.HandlerBase |
---|
ignorableWhitespace, notationDecl, resolveEntity, unparsedEntityDecl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
IXMLController controller
private java.io.CharArrayWriter contents
Constructor Detail |
---|
public SaxXMLBuilder(IXMLController control)
control
- Controller of the applicationMethod Detail |
---|
public void setDocumentLocator(org.xml.sax.Locator locator)
setDocumentLocator
in interface org.xml.sax.DocumentHandler
setDocumentLocator
in class org.xml.sax.HandlerBase
locator
- The SAX Locator objectpublic void startDocument() throws org.xml.sax.SAXException
startDocument
in interface org.xml.sax.DocumentHandler
startDocument
in class org.xml.sax.HandlerBase
org.xml.sax.SAXException
- Error reported by the handler's methodpublic void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.DocumentHandler
endDocument
in class org.xml.sax.HandlerBase
org.xml.sax.SAXException
- Error reported by the handler's methodpublic void startElement(java.lang.String name, org.xml.sax.AttributeList attributes) throws org.xml.sax.SAXException
startElement
in interface org.xml.sax.DocumentHandler
startElement
in class org.xml.sax.HandlerBase
name
- The element's nameattributes
- The element's attributes
org.xml.sax.SAXException
- Error reported by the controller's methodpublic void endElement(java.lang.String name) throws org.xml.sax.SAXException
endElement
in interface org.xml.sax.DocumentHandler
endElement
in class org.xml.sax.HandlerBase
name
- The element's name
org.xml.sax.SAXException
- Error reported by the handler's methodpublic void characters(char[] buf, int start, int length)
characters
in interface org.xml.sax.DocumentHandler
characters
in class org.xml.sax.HandlerBase
buf
- Bufferstart
- Start positionlength
- Length positionpublic void processingInstruction(java.lang.String target, java.lang.String data) throws org.xml.sax.SAXException
processingInstruction
in interface org.xml.sax.DocumentHandler
processingInstruction
in class org.xml.sax.HandlerBase
target
- The target of the processing instruction.data
- The data of the processing instruction.
org.xml.sax.SAXException
- Error reported by the handler's methodpublic void warning(org.xml.sax.SAXParseException exception)
warning
in interface org.xml.sax.ErrorHandler
warning
in class org.xml.sax.HandlerBase
exception
- SAXException in the warning processpublic void error(org.xml.sax.SAXParseException exception)
error
in interface org.xml.sax.ErrorHandler
error
in class org.xml.sax.HandlerBase
exception
- SAXException in the error processpublic void fatalError(org.xml.sax.SAXParseException exception) throws org.xml.sax.SAXException
fatalError
in interface org.xml.sax.ErrorHandler
fatalError
in class org.xml.sax.HandlerBase
exception
- SAXException in the fatalError exception
org.xml.sax.SAXException
- Error reported by the controller's method
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |