Parser.hpp
Go to the documentation of this file.
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id$
*/
#if !defined(XERCESC_INCLUDE_GUARD_PARSER_HPP)
#define XERCESC_INCLUDE_GUARD_PARSER_HPP
#include <xercesc/util/XercesDefs.hpp>
XERCES_CPP_NAMESPACE_BEGIN
class DTDHandler;
class EntityResolver;
class DocumentHandler;
class ErrorHandler;
class InputSource;
#include <xercesc/util/XercesDefs.hpp>
class SAX_EXPORT Parser
{
public:
// -----------------------------------------------------------------------
// Constructors and Destructor
// -----------------------------------------------------------------------
Parser()
{
}
virtual ~Parser()
{
}
//-----------------------------------------------------------------------
// The parser interface
//-----------------------------------------------------------------------
virtual void setEntityResolver(EntityResolver* const resolver) = 0;
virtual void setDTDHandler(DTDHandler* const handler) = 0;
virtual void setDocumentHandler(DocumentHandler* const handler) = 0;
virtual void setErrorHandler(ErrorHandler* const handler) = 0;
virtual void parse
(
const InputSource& source
) = 0;
virtual void parse
(
const XMLCh* const systemId
) = 0;
virtual void parse
(
const char* const systemId
) = 0;
private :
/* The copy constructor, you cannot call this directly */
Parser(const Parser&);
/* The assignment operator, you cannot call this directly */
Parser& operator=(const Parser&);
};
XERCES_CPP_NAMESPACE_END
#endif
XercesDefs.hpp
XERCES_CPP_NAMESPACE_BEGIN
#define XERCES_CPP_NAMESPACE_BEGIN
Definition: XercesDefs.hpp:112
SAX_EXPORT
#define SAX_EXPORT
Definition: XercesDefs.hpp:164
XERCES_CPP_NAMESPACE_END
#define XERCES_CPP_NAMESPACE_END
Definition: XercesDefs.hpp:113
XMLCh
uint16_t XMLCh
Definition: Xerces_autoconf_config.hpp:120
DTDHandler
Receive notification of basic DTD-related events.
Definition: DTDHandler.hpp:60
DocumentHandler
Receive notification of general document events.
Definition: DocumentHandler.hpp:61
EntityResolver
Basic interface for resolving entities.
Definition: EntityResolver.hpp:87
ErrorHandler
Basic interface for SAX error handlers.
Definition: ErrorHandler.hpp:61
InputSource
A single input source for an XML entity.
Definition: InputSource.hpp:63
Parser
Basic interface for SAX (Simple API for XML) parsers.
Definition: Parser.hpp:61
Parser::Parser
Parser()
The default constructor.
Definition: Parser.hpp:69
Parser::setDocumentHandler
virtual void setDocumentHandler(DocumentHandler *const handler)=0
Allow an application to register a document event handler.
Parser::parse
virtual void parse(const XMLCh *const systemId)=0
Parse an XML document from a system identifier (URI).
Parser::setEntityResolver
virtual void setEntityResolver(EntityResolver *const resolver)=0
Allow an application to register a custom entity resolver.
Parser::parse
virtual void parse(const InputSource &source)=0
Parse an XML document.
Parser::parse
virtual void parse(const char *const systemId)=0
Parse an XML document from a system identifier (URI).
Parser::setErrorHandler
virtual void setErrorHandler(ErrorHandler *const handler)=0
Allow an application to register an error event handler.
Parser::~Parser
virtual ~Parser()
The destructor.
Definition: Parser.hpp:73
Parser::setDTDHandler
virtual void setDTDHandler(DTDHandler *const handler)=0
Allow an application to register a DTD event handler.