00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 #ifndef HANDLERBASE_HPP
00092 #define HANDLERBASE_HPP
00093
00094 #include <xercesc/sax/DocumentHandler.hpp>
00095 #include <xercesc/sax/DTDHandler.hpp>
00096 #include <xercesc/sax/EntityResolver.hpp>
00097 #include <xercesc/sax/ErrorHandler.hpp>
00098 #include <xercesc/sax/SAXParseException.hpp>
00099
00100 class Locator;
00101 class AttributeList;
00102
00122
00123 class HandlerBase :
00124
00125 public EntityResolver, public DTDHandler, public DocumentHandler
00126 , public ErrorHandler
00127 {
00128 public:
00131
00146 virtual void characters
00147 (
00148 const XMLCh* const chars
00149 , const unsigned int length
00150 );
00151
00164 virtual void endDocument();
00165
00179 virtual void endElement(const XMLCh* const name);
00180
00196 virtual void ignorableWhitespace
00197 (
00198 const XMLCh* const chars
00199 , const unsigned int length
00200 );
00201
00217 virtual void processingInstruction
00218 (
00219 const XMLCh* const target
00220 , const XMLCh* const data
00221 );
00222
00228 virtual void resetDocument();
00230
00232
00234
00245 virtual void setDocumentLocator(const Locator* const locator);
00246
00259 virtual void startDocument();
00260
00275 virtual void startElement
00276 (
00277 const XMLCh* const name
00278 , AttributeList& attributes
00279 );
00280
00282
00284
00286
00305 virtual InputSource* resolveEntity
00306 (
00307 const XMLCh* const publicId
00308 , const XMLCh* const systemId
00309 );
00310
00312
00315
00329 virtual void error(const SAXParseException& exception);
00330
00348 virtual void fatalError(const SAXParseException& exception);
00349
00364 virtual void warning(const SAXParseException& exception);
00365
00371 virtual void resetErrors();
00372
00374
00375
00378
00392 virtual void notationDecl
00393 (
00394 const XMLCh* const name
00395 , const XMLCh* const publicId
00396 , const XMLCh* const systemId
00397 );
00398
00404 virtual void resetDocType();
00405
00420 virtual void unparsedEntityDecl
00421 (
00422 const XMLCh* const name
00423 , const XMLCh* const publicId
00424 , const XMLCh* const systemId
00425 , const XMLCh* const notationName
00426 );
00428 };
00429
00430
00431
00432
00433
00434 inline void HandlerBase::characters(const XMLCh* const chars
00435 , const unsigned int length)
00436 {
00437 }
00438
00439 inline void HandlerBase::endDocument()
00440 {
00441 }
00442
00443 inline void HandlerBase::endElement(const XMLCh* const name)
00444 {
00445 }
00446
00447 inline void HandlerBase::error(const SAXParseException& exception)
00448 {
00449 }
00450
00451 inline void HandlerBase::fatalError(const SAXParseException& exception)
00452 {
00453 throw exception;
00454 }
00455
00456 inline void
00457 HandlerBase::ignorableWhitespace( const XMLCh* const chars
00458 , const unsigned int length)
00459 {
00460 }
00461
00462 inline void HandlerBase::notationDecl( const XMLCh* const name
00463 , const XMLCh* const publicId
00464 , const XMLCh* const systemId)
00465 {
00466 }
00467
00468 inline void
00469 HandlerBase::processingInstruction( const XMLCh* const target
00470 , const XMLCh* const data)
00471 {
00472 }
00473
00474 inline void HandlerBase::resetErrors()
00475 {
00476 }
00477
00478 inline void HandlerBase::resetDocument()
00479 {
00480 }
00481
00482 inline void HandlerBase::resetDocType()
00483 {
00484 }
00485
00486 inline InputSource*
00487 HandlerBase::resolveEntity( const XMLCh* const publicId
00488 , const XMLCh* const systemId)
00489 {
00490 return 0;
00491 }
00492
00493 inline void
00494 HandlerBase::unparsedEntityDecl(const XMLCh* const name
00495 , const XMLCh* const publicId
00496 , const XMLCh* const systemId
00497 , const XMLCh* const notationName)
00498 {
00499 }
00500
00501 inline void HandlerBase::setDocumentLocator(const Locator* const locator)
00502 {
00503 }
00504
00505 inline void HandlerBase::startDocument()
00506 {
00507 }
00508
00509 inline void
00510 HandlerBase::startElement( const XMLCh* const name
00511 , AttributeList& attributes)
00512 {
00513 }
00514
00515 inline void HandlerBase::warning(const SAXParseException& exception)
00516 {
00517 }
00518
00519 #endif