Xerces-C++: SAX2XMLReader.hpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22#if !defined(XERCESC_INCLUDE_GUARD_SAX2XMLREADER_HPP)
23#define XERCESC_INCLUDE_GUARD_SAX2XMLREADER_HPP
24
28#include <xercesc/framework/XMLPScanToken.hpp>
29#include <xercesc/validators/common/Grammar.hpp>
30
32
41
43{
44public:
45
46
47
50
71 {
72 Val_Never
73 , Val_Always
74 , Val_Auto
77
78
79
80
81
93
94
95
96
99
106
113
120
127
136
156
174
191
209
228
252 virtual void setFeature(const XMLCh* const name, const bool value) = 0;
253
281
308 (
310 ) = 0;
311
332 (
333 const XMLCh* const systemId
334 ) = 0;
335
356 (
357 const char* const systemId
358 ) = 0;
359
361
362
363
364
373
380
398
416
418
419
420
421
435
447
462
478
486
493
501
509
511
512
513
514
527
550
578
579
580
581
582
583
586
615 (
616 const XMLCh* const systemId
617 , XMLPScanToken& toFill
618 ) = 0;
619
648 (
649 const char* const systemId
650 , XMLPScanToken& toFill
651 ) = 0;
652
681 (
683 , XMLPScanToken& toFill
684 ) = 0;
685
710 virtual bool parseNext(XMLPScanToken& token) = 0;
711
733 virtual void parseReset(XMLPScanToken& token) = 0;
734
736
737
738
739
740
770 const Grammar::GrammarType grammarType,
771 const bool toCache = false) = 0;
772
798 const Grammar::GrammarType grammarType,
799 const bool toCache = false) = 0;
800
824 virtual Grammar* loadGrammar(const char* const systemId,
825 const Grammar::GrammarType grammarType,
826 const bool toCache = false) = 0;
827
832
843 virtual void setInputBufferSize(const XMLSize_t bufferSize);
844
846
847
848
849
850
851
868
880
881private :
882
884
885
887
888};
889
893
895
896#endif
#define SAX2_EXPORT
Definition XercesDefs.hpp:165
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
XMLUInt64 XMLFilePos
Definition Xerces_autoconf_config.hpp:139
Receive notification of general document events.
Definition ContentHandler.hpp:61
Receive notification of basic DTD-related events.
Definition DTDHandler.hpp:60
Receive notification of DTD declaration events.
Definition DeclHandler.hpp:49
Basic interface for resolving entities.
Definition EntityResolver.hpp:87
Basic interface for SAX error handlers.
Definition ErrorHandler.hpp:61
A single input source for an XML entity.
Definition InputSource.hpp:63
Receive notification of lexical events.
Definition LexicalHandler.hpp:47
Definition SAX2XMLReader.hpp:43
virtual void setProperty(const XMLCh *const name, void *value)=0
Set the value of any property in a SAX2 XMLReader.
virtual const XMLCh * getURIText(unsigned int uriId) const =0
Returns the string corresponding to a URI id from the URI string pool.
virtual void setValidationConstraintFatal(const bool newState)=0
This method allows users to set the parser's behaviour when it encounters a validation constraint err...
virtual Grammar * getRootGrammar()=0
Retrieve the grammar where the root element is declared.
virtual void parse(const InputSource &source)=0
Parse an XML document.
virtual Grammar * loadGrammar(const XMLCh *const systemId, const Grammar::GrammarType grammarType, const bool toCache=false)=0
Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL.
virtual void setValidator(XMLValidator *valueToAdopt)=0
This method is used to set a validator.
virtual void setLexicalHandler(LexicalHandler *const handler)=0
Allow an application to register a lexical event handler.
virtual Grammar * loadGrammar(const InputSource &source, const Grammar::GrammarType grammarType, const bool toCache=false)=0
Preparse schema grammar (XML Schema, DTD, etc.) via an input source object.
virtual XMLFilePos getSrcOffset() const =0
Returns the current src offset within the input source.
virtual void * getProperty(const XMLCh *const name) const =0
Query the current value of a property in a SAX2 XMLReader.
virtual bool removeAdvDocHandler(XMLDocumentHandler *const toRemove)=0
This method removes the 'advanced' document handler callback from the underlying parser scanner.
virtual void installAdvDocHandler(XMLDocumentHandler *const toInstall)=0
This method installs the specified 'advanced' document callback handler, thereby allowing the user to...
virtual void parseReset(XMLPScanToken &token)=0
Reset the parser after a progressive parse.
virtual void setDeclarationHandler(DeclHandler *const handler)=0
Allow an application to register a declaration event handler.
virtual ~SAX2XMLReader()
The destructor.
Definition SAX2XMLReader.hpp:89
virtual bool getExitOnFirstFatalError() const =0
This method returns the state of the parser's exit-on-First-Fatal-Error flag.
virtual bool getFeature(const XMLCh *const name) const =0
Query the current state of any feature in a SAX2 XMLReader.
virtual void setInputBufferSize(const XMLSize_t bufferSize)
Set maximum input buffer size.
Definition SAX2XMLReader.hpp:890
virtual LexicalHandler * getLexicalHandler() const =0
This method returns the installed lexical handler.
virtual void resetCachedGrammarPool()=0
Clear the cached grammar pool.
virtual void setErrorHandler(ErrorHandler *const handler)=0
Allow an application to register an error event handler.
virtual XMLValidator * getValidator() const =0
This method is used to get the current validator.
virtual DeclHandler * getDeclarationHandler() const =0
This method returns the installed declaration handler.
virtual void setContentHandler(ContentHandler *const handler)=0
Allow an application to register a document event handler.
virtual DTDHandler * getDTDHandler() const =0
This method returns the installed DTD handler.
virtual void setFeature(const XMLCh *const name, const bool value)=0
Set the state of any feature in a SAX2 XMLReader.
virtual XMLSize_t getErrorCount() const =0
Get error count from the last parse operation.
virtual bool parseFirst(const char *const systemId, XMLPScanToken &toFill)=0
Begin a progressive parse operation.
virtual void parse(const char *const systemId)=0
Parse an XML document from a system identifier (URI).
virtual bool parseFirst(const InputSource &source, XMLPScanToken &toFill)=0
Begin a progressive parse operation.
virtual void setEntityResolver(EntityResolver *const resolver)=0
Allow an application to register a custom entity resolver.
virtual void setDTDHandler(DTDHandler *const handler)=0
Allow an application to register a DTD event handler.
virtual Grammar * loadGrammar(const char *const systemId, const Grammar::GrammarType grammarType, const bool toCache=false)=0
Preparse schema grammar (XML Schema, DTD, etc.) via a file path or URL.
virtual Grammar * getGrammar(const XMLCh *const nameSpaceKey)=0
Retrieve the grammar that is associated with the specified namespace key.
virtual ContentHandler * getContentHandler() const =0
This method returns the installed content handler.
virtual void setExitOnFirstFatalError(const bool newState)=0
This method allows users to set the parser's behaviour when it encounters the first fatal error.
ValSchemes
ValScheme enum used in setValidationScheme Val_Never: Do not report validation errors.
Definition SAX2XMLReader.hpp:71
virtual bool parseFirst(const XMLCh *const systemId, XMLPScanToken &toFill)=0
Begin a progressive parse operation.
virtual bool getValidationConstraintFatal() const =0
This method returns the state of the parser's validation-constraint-fatal flag.
virtual bool parseNext(XMLPScanToken &token)=0
Continue a progressive parse operation.
virtual ErrorHandler * getErrorHandler() const =0
This method returns the installed error handler.
virtual EntityResolver * getEntityResolver() const =0
This method returns the installed entity resolver.
virtual void parse(const XMLCh *const systemId)=0
Parse an XML document from a system identifier (URI).
SAX2XMLReader()
The default constructor.
Definition SAX2XMLReader.hpp:85
This abstract class provides the interface for the scanner to return XML document information up to t...
Definition XMLDocumentHandler.hpp:43
This abstract class provides the interface for all validators.
Definition XMLValidator.hpp:53