Xerces-C++  3.1.2
DOMLSParser.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 /*
19  * $Id: DOMLSParser.hpp 832686 2009-11-04 08:55:59Z borisk $
20  *
21  */
22 
23 #if !defined(XERCESC_INCLUDE_GUARD_DOMLSPARSER_HPP)
24 #define XERCESC_INCLUDE_GUARD_DOMLSPARSER_HPP
25 
29 #include <xercesc/validators/common/Grammar.hpp>
30 
32 
33 
34 class DOMErrorHandler;
35 class DOMLSInput;
36 class DOMNode;
37 class DOMDocument;
38 
48 {
49 protected :
50  // -----------------------------------------------------------------------
51  // Hidden constructors
52  // -----------------------------------------------------------------------
57 
58 private:
59  // -----------------------------------------------------------------------
60  // Unimplemented constructors and operators
61  // -----------------------------------------------------------------------
64  DOMLSParser(const DOMLSParser &);
65  DOMLSParser & operator = (const DOMLSParser &);
67 
68 public:
69  // -----------------------------------------------------------------------
70  // All constructors are hidden, just the destructor is available
71  // -----------------------------------------------------------------------
78  virtual ~DOMLSParser() {};
80 
81  // -----------------------------------------------------------------------
82  // Class types
83  // -----------------------------------------------------------------------
118  {
119  ACTION_APPEND_AS_CHILDREN = 1,
120  ACTION_REPLACE_CHILDREN = 2,
121  ACTION_INSERT_BEFORE = 3,
122  ACTION_INSERT_AFTER = 4,
123  ACTION_REPLACE = 5
124  };
126 
127  // -----------------------------------------------------------------------
128  // Virtual DOMLSParser interface
129  // -----------------------------------------------------------------------
132 
133  // -----------------------------------------------------------------------
134  // Getter methods
135  // -----------------------------------------------------------------------
136 
377  virtual DOMConfiguration* getDomConfig() = 0;
378 
388  virtual const DOMLSParserFilter* getFilter() const = 0;
389 
397  virtual bool getAsync() const = 0;
398 
406  virtual bool getBusy() const = 0;
407 
408  // -----------------------------------------------------------------------
409  // Setter methods
410  // -----------------------------------------------------------------------
431  virtual void setFilter(DOMLSParserFilter* const filter) = 0;
432 
433  // -----------------------------------------------------------------------
434  // Parsing methods
435  // -----------------------------------------------------------------------
463  virtual DOMDocument* parse(const DOMLSInput* source) = 0;
464 
492  virtual DOMDocument* parseURI(const XMLCh* const uri) = 0;
493 
521  virtual DOMDocument* parseURI(const char* const uri) = 0;
522 
590  virtual DOMNode* parseWithContext(const DOMLSInput* source, DOMNode* contextNode, const ActionType action) = 0;
591 
600  virtual void abort() = 0;
602 
603  // -----------------------------------------------------------------------
604  // Non-standard Extension
605  // -----------------------------------------------------------------------
614  virtual void release() = 0;
615 
639  virtual void resetDocumentPool() = 0;
640 
666  virtual Grammar* loadGrammar(const DOMLSInput* source,
667  const Grammar::GrammarType grammarType,
668  const bool toCache = false) = 0;
669 
693  virtual Grammar* loadGrammar(const XMLCh* const systemId,
694  const Grammar::GrammarType grammarType,
695  const bool toCache = false) = 0;
696 
720  virtual Grammar* loadGrammar(const char* const systemId,
721  const Grammar::GrammarType grammarType,
722  const bool toCache = false) = 0;
723 
730  virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
731 
737  virtual Grammar* getRootGrammar() const = 0;
738 
745  virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
746 
750  virtual void resetCachedGrammarPool() = 0;
751 
757  virtual XMLFilePos getSrcOffset() const = 0;
758 
760 
761 };
762 
763 
765 
766 #endif
The DOMConfiguration interface represents the configuration of a document and maintains a table of re...
Definition: DOMConfiguration.hpp:350
DOMLSParser()
Definition: DOMLSParser.hpp:55
This interface represents a single input source for an XML entity.
Definition: DOMLSInput.hpp:59
XMLUInt64 XMLFilePos
Definition: Xerces_autoconf_config.borland.hpp:111
DOMLSParser provides an API for parsing XML documents and building the corresponding DOM document tre...
Definition: DOMLSParser.hpp:47
Definition: DOMLSParserFilter.hpp:45
Basic interface for DOM error handlers.
Definition: DOMErrorHandler.hpp:46
The DOMDocument interface represents the entire XML document.
Definition: DOMDocument.hpp:64
#define CDOM_EXPORT
Definition: XercesDefs.hpp:166
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
virtual ~DOMLSParser()
Destructor.
Definition: DOMLSParser.hpp:78
wchar_t XMLCh
Definition: Xerces_autoconf_config.borland.hpp:92
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
ActionType
A set of possible actions for the parseWithContext method.
Definition: DOMLSParser.hpp:117
The DOMNode interface is the primary datatype for the entire Document Object Model.
Definition: DOMNode.hpp:139