00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #if !defined(XERCESC_INCLUDE_GUARD_DOMLSPARSER_HPP)
00024 #define XERCESC_INCLUDE_GUARD_DOMLSPARSER_HPP
00025
00026 #include <xercesc/dom/DOMConfiguration.hpp>
00027 #include <xercesc/util/XercesDefs.hpp>
00028 #include <xercesc/validators/common/Grammar.hpp>
00029
00030 XERCES_CPP_NAMESPACE_BEGIN
00031
00032
00033 class DOMErrorHandler;
00034 class DOMLSInput;
00035 class DOMLSParserFilter;
00036 class DOMNode;
00037 class DOMDocument;
00038
00047 class CDOM_EXPORT DOMLSParser
00048 {
00049 protected :
00050
00051
00052
00055 DOMLSParser() {};
00057
00058 private:
00059
00060
00061
00064 DOMLSParser(const DOMLSParser &);
00065 DOMLSParser & operator = (const DOMLSParser &);
00067
00068 public:
00069
00070
00071
00078 virtual ~DOMLSParser() {};
00080
00081
00082
00083
00117 enum ActionType
00118 {
00119 ACTION_APPEND_AS_CHILDREN = 1,
00120 ACTION_REPLACE_CHILDREN = 2,
00121 ACTION_INSERT_BEFORE = 3,
00122 ACTION_INSERT_AFTER = 4,
00123 ACTION_REPLACE = 5
00124 };
00126
00127
00128
00129
00132
00133
00134
00135
00136
00377 virtual DOMConfiguration* getDomConfig() = 0;
00378
00388 virtual const DOMLSParserFilter* getFilter() const = 0;
00389
00397 virtual bool getAsync() const = 0;
00398
00406 virtual bool getBusy() const = 0;
00407
00408
00409
00410
00431 virtual void setFilter(DOMLSParserFilter* const filter) = 0;
00432
00433
00434
00435
00462 virtual DOMDocument* parse(const DOMLSInput* source) = 0;
00463
00490 virtual DOMDocument* parseURI(const XMLCh* const uri) = 0;
00491
00518 virtual DOMDocument* parseURI(const char* const uri) = 0;
00519
00587 virtual void parseWithContext
00588 (
00589 const DOMLSInput* source
00590 , DOMNode* contextNode
00591 , const ActionType action
00592 ) = 0;
00593
00602 virtual void abort() = 0;
00604
00605
00606
00607
00616 virtual void release() = 0;
00617
00641 virtual void resetDocumentPool() = 0;
00642
00668 virtual Grammar* loadGrammar(const DOMLSInput* source,
00669 const Grammar::GrammarType grammarType,
00670 const bool toCache = false) = 0;
00671
00695 virtual Grammar* loadGrammar(const XMLCh* const systemId,
00696 const Grammar::GrammarType grammarType,
00697 const bool toCache = false) = 0;
00698
00722 virtual Grammar* loadGrammar(const char* const systemId,
00723 const Grammar::GrammarType grammarType,
00724 const bool toCache = false) = 0;
00725
00732 virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
00733
00739 virtual Grammar* getRootGrammar() const = 0;
00740
00747 virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
00748
00752 virtual void resetCachedGrammarPool() = 0;
00753
00759 virtual XMLFilePos getSrcOffset() const = 0;
00760
00762
00763 };
00764
00765
00766 XERCES_CPP_NAMESPACE_END
00767
00768 #endif