Xerces-C++: XMLDocumentHandler.hpp Source File

Xerces-C++ 3.3.0

XMLDocumentHandler.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$
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XMLDOCUMENTHANDLER_HPP)
23#define XERCESC_INCLUDE_GUARD_XMLDOCUMENTHANDLER_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26#include <xercesc/util/RefVectorOf.hpp>
27#include <xercesc/framework/XMLAttr.hpp>
28
29 XERCES_CPP_NAMESPACE_BEGIN
30
31class XMLElementDecl;
32class XMLEntityDecl;
33
42 class XMLPARSER_EXPORT XMLDocumentHandler
43{
44public:
45 // -----------------------------------------------------------------------
46 // Constructors are hidden, just the virtual destructor is exposed
47 // -----------------------------------------------------------------------
50 virtual ~XMLDocumentHandler()
51 {
52 }
54
77 virtual void docCharacters
78 (
79 const XMLCh* const chars
80 , const XMLSize_t length
81 , const bool cdataSection
82 ) = 0;
83
91 virtual void docComment
92 (
93 const XMLCh* const comment
94 ) = 0;
95
105 virtual void docPI
106 (
107 const XMLCh* const target
108 , const XMLCh* const data
109 ) = 0;
110
118 virtual void endDocument() = 0;
119
134 virtual void endElement
135 (
136 const XMLElementDecl& elemDecl
137 , const unsigned int uriId
138 , const bool isRoot
139 , const XMLCh* const prefixName = 0
140 ) = 0;
141
149 virtual void endEntityReference
150 (
151 const XMLEntityDecl& entDecl
152 ) = 0;
153
176 virtual void ignorableWhitespace
177 (
178 const XMLCh* const chars
179 , const XMLSize_t length
180 , const bool cdataSection
181 ) = 0;
182
189 virtual void resetDocument() = 0;
190
196 virtual void startDocument() = 0;
197
215 virtual void startElement
216 (
217 const XMLElementDecl& elemDecl
218 , const unsigned int uriId
219 , const XMLCh* const prefixName
220 , const RefVectorOf<XMLAttr>& attrList
221 , const XMLSize_t attrCount
222 , const bool isEmpty
223 , const bool isRoot
224 ) = 0;
225
233 virtual void startEntityReference(const XMLEntityDecl& entDecl) = 0;
234
252 virtual void XMLDecl
253 (
254 const XMLCh* const versionStr
255 , const XMLCh* const encodingStr
256 , const XMLCh* const standaloneStr
257 , const XMLCh* const autoEncodingStr
258 ) = 0;
259
261
262
263
264protected :
265 // -----------------------------------------------------------------------
266 // Hidden Constructors
267 // -----------------------------------------------------------------------
268 XMLDocumentHandler()
269 {
270 }
271
272
273private:
274 // -----------------------------------------------------------------------
275 // Unimplemented constructors and operators
276 // -----------------------------------------------------------------------
277 XMLDocumentHandler(const XMLDocumentHandler&);
278 XMLDocumentHandler& operator=(const XMLDocumentHandler&);
279};
280
281 XERCES_CPP_NAMESPACE_END
282
283#endif
XMLAttr.hpp
XercesDefs.hpp
XMLPARSER_EXPORT
#define XMLPARSER_EXPORT
Definition XercesDefs.hpp:163
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition XercesDefs.hpp:112
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition XercesDefs.hpp:113
XMLSize_t
size_t XMLSize_t
Definition Xerces_autoconf_config.hpp:112
XMLCh
char16_t XMLCh
Definition Xerces_autoconf_config.hpp:120
XMLDocumentHandler
This abstract class provides the interface for the scanner to return XML document information up to t...
Definition XMLDocumentHandler.hpp:43
XMLDocumentHandler::endEntityReference
virtual void endEntityReference(const XMLEntityDecl &entDecl)=0
Receive notification when a referenced entity's content ends.
XMLDocumentHandler::startElement
virtual void startElement(const XMLElementDecl &elemDecl, const unsigned int uriId, const XMLCh *const prefixName, const RefVectorOf< XMLAttr > &attrList, const XMLSize_t attrCount, const bool isEmpty, const bool isRoot)=0
Receive notification of a new start tag.
XMLDocumentHandler::XMLDecl
virtual void XMLDecl(const XMLCh *const versionStr, const XMLCh *const encodingStr, const XMLCh *const standaloneStr, const XMLCh *const autoEncodingStr)=0
Receive notification of an XML declaration.
XMLDocumentHandler::startEntityReference
virtual void startEntityReference(const XMLEntityDecl &entDecl)=0
Receive notification when the scanner hits an entity reference.
XMLDocumentHandler::endElement
virtual void endElement(const XMLElementDecl &elemDecl, const unsigned int uriId, const bool isRoot, const XMLCh *const prefixName=0)=0
Receive notification of the end of an element.
XMLDocumentHandler::XMLDocumentHandler
XMLDocumentHandler()
Definition XMLDocumentHandler.hpp:268
XMLDocumentHandler::resetDocument
virtual void resetDocument()=0
Reset the document handler's state, if required.
XMLDocumentHandler::~XMLDocumentHandler
virtual ~XMLDocumentHandler()
Definition XMLDocumentHandler.hpp:50
XMLDocumentHandler::endDocument
virtual void endDocument()=0
Receive notification after the scanner has parsed the end of the document.
XMLDocumentHandler::docComment
virtual void docComment(const XMLCh *const comment)=0
Receive notification of comments in the XML content being parsed.
XMLDocumentHandler::startDocument
virtual void startDocument()=0
Receive notification of the start of a new document.
XMLDocumentHandler::ignorableWhitespace
virtual void ignorableWhitespace(const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)=0
Receive notification of ignorable whitespace in element content.
XMLDocumentHandler::docCharacters
virtual void docCharacters(const XMLCh *const chars, const XMLSize_t length, const bool cdataSection)=0
Receive notification of character data.
XMLDocumentHandler::docPI
virtual void docPI(const XMLCh *const target, const XMLCh *const data)=0
Receive notification of PI's parsed in the XML content.
XMLElementDecl
This class defines the core information of an element declaration.
Definition XMLElementDecl.hpp:52
XMLEntityDecl
This class defines that core information that defines an XML entity, no matter what validator is used...
Definition XMLEntityDecl.hpp:51