00001 #ifndef DOMBuilder_HEADER_GUARD_
00002 #define DOMBuilder_HEADER_GUARD_
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 #include <xercesc/util/XercesDefs.hpp>
00067
00068 XERCES_CPP_NAMESPACE_BEGIN
00069
00070
00071 class DOMErrorHandler;
00072 class DOMEntityResolver;
00073 class DOMInputSource;
00074 class DOMBuilderFilter;
00075 class DOMNode;
00076 class DOMDocument;
00077 class Grammar;
00078
00089 class DOMBuilder
00090 {
00091 protected :
00092
00093
00094
00097 DOMBuilder() {};
00099
00100 private:
00101
00102
00103
00106 DOMBuilder(const DOMBuilder &);
00107 DOMBuilder & operator = (const DOMBuilder &);
00109
00110 public:
00111
00112
00113
00120 virtual ~DOMBuilder() {};
00122
00123
00124
00125
00155 enum ActionType
00156 {
00157 ACTION_REPLACE = 1,
00158 ACTION_APPEND_AS_CHILDREN = 2,
00159 ACTION_INSERT_AFTER = 3,
00160 ACTION_INSERT_BEFORE = 4
00161 };
00163
00164
00165
00166
00169
00170
00171
00172
00173
00185 virtual DOMErrorHandler* getErrorHandler() = 0;
00186
00198 virtual const DOMErrorHandler* getErrorHandler() const = 0;
00199
00211 virtual DOMEntityResolver* getEntityResolver() = 0;
00212
00224 virtual const DOMEntityResolver* getEntityResolver() const = 0;
00225
00237 virtual DOMBuilderFilter* getFilter() = 0;
00238
00250 virtual const DOMBuilderFilter* getFilter() const = 0;
00251
00252
00253
00254
00272 virtual void setErrorHandler(DOMErrorHandler* const handler) = 0;
00273
00293 virtual void setEntityResolver(DOMEntityResolver* const handler) = 0;
00294
00316 virtual void setFilter(DOMBuilderFilter* const filter) = 0;
00317
00318
00319
00320
00344 virtual void setFeature(const XMLCh* const name, const bool state) = 0;
00345
00361 virtual bool getFeature(const XMLCh* const name) const = 0;
00362
00379 virtual bool canSetFeature(const XMLCh* const name, const bool state) const = 0;
00380
00381
00382
00383
00414 virtual DOMDocument* parse(const DOMInputSource& source) = 0;
00415
00443 virtual DOMDocument* parseURI(const XMLCh* const systemId) = 0;
00444
00471 virtual DOMDocument* parseURI(const char* const systemId) = 0;
00472
00501 virtual void parseWithContext
00502 (
00503 const DOMInputSource& source
00504 , DOMNode* const contextNode
00505 , const short action
00506 ) = 0;
00508
00509
00510
00511
00514
00536 virtual void* getProperty(const XMLCh* const name) const = 0 ;
00537
00559 virtual void setProperty(const XMLCh* const name, void* value) = 0 ;
00560
00567 virtual void release() = 0;
00568
00592 virtual void resetDocumentPool() = 0;
00593
00621 virtual Grammar* loadGrammar(const DOMInputSource& source,
00622 const short grammarType,
00623 const bool toCache = false) = 0;
00624
00650 virtual Grammar* loadGrammar(const XMLCh* const systemId,
00651 const short grammarType,
00652 const bool toCache = false) = 0;
00653
00679 virtual Grammar* loadGrammar(const char* const systemId,
00680 const short grammarType,
00681 const bool toCache = false) = 0;
00682
00689 virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
00690
00696 virtual Grammar* getRootGrammar() const = 0;
00697
00704 virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
00705
00709 virtual void resetCachedGrammarPool() = 0;
00710
00716 virtual unsigned int getSrcOffset() const = 0;
00717
00719
00720 };
00721
00722
00723 XERCES_CPP_NAMESPACE_END
00724
00725 #endif