3
//=============================================================================
5
* @file ContentHandler.h
7
* ContentHandler.h,v 1.7 2003/07/19 19:04:10 dhinton Exp
9
* @author Nanbor Wang <nanbor@cs.wustl.edu>
11
//=============================================================================
12
#ifndef _ACEXML_CONTENTHANDLER_H_
13
#define _ACEXML_CONTENTHANDLER_H_
15
#include /**/ "ace/pre.h"
16
#include "ACEXML/common/ACEXML_Export.h"
18
#if !defined (ACE_LACKS_PRAGMA_ONCE)
20
#endif /* ACE_LACKS_PRAGMA_ONCE */
22
#include "ACEXML/common/Env.h"
23
#include "ACEXML/common/SAXExceptions.h"
24
#include "ACEXML/common/Locator.h"
25
#include "ACEXML/common/Attributes.h"
28
* @class ACEXML_ContentHandler ContentHandler.h "ACEXML/common/ContentHandler.h"
30
* @brief ACEXML_ContentHandler
32
* This is the main interface that most SAX applications implement: if the
33
* application needs to be informed of basic parsing events, it implements
34
* this interface and registers an instance with the SAX parser using the
35
* setContentHandler method. The parser uses the instance to report basic
36
* document-related events like the start and end of elements and character
39
* The order of events in this interface is very important, and mirrors the
40
* order of information in the document itself. For example, all of an
41
* element's content (character data, processing instructions, and/or
42
* subelements) will appear, in order, between the startElement event and
43
* the corresponding endElement event.
45
class ACEXML_Export ACEXML_ContentHandler
49
* Receive notification of character data.
51
virtual void characters (const ACEXML_Char *ch,
53
int length ACEXML_ENV_ARG_DECL)
54
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
57
* Receive notification of the end of a document.
59
virtual void endDocument (ACEXML_ENV_SINGLE_ARG_DECL)
60
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
63
* Receive notification of the end of an element.
65
virtual void endElement (const ACEXML_Char *namespaceURI,
66
const ACEXML_Char *localName,
67
const ACEXML_Char *qName ACEXML_ENV_ARG_DECL)
68
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
71
* End the scope of a prefix-URI mapping.
73
virtual void endPrefixMapping (const ACEXML_Char *prefix ACEXML_ENV_ARG_DECL)
74
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
77
* Receive notification of ignorable whitespace in element content.
79
virtual void ignorableWhitespace (const ACEXML_Char *ch,
81
int length ACEXML_ENV_ARG_DECL)
82
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
85
* Receive notification of a processing instruction.
87
virtual void processingInstruction (const ACEXML_Char *target,
88
const ACEXML_Char *data ACEXML_ENV_ARG_DECL)
89
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
92
* Receive an object for locating the origin of SAX document events.
94
virtual void setDocumentLocator (ACEXML_Locator *locator) = 0;
97
* Receive notification of a skipped entity.
99
virtual void skippedEntity (const ACEXML_Char *name ACEXML_ENV_ARG_DECL)
100
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
103
* Receive notification of the beginning of a document.
105
virtual void startDocument (ACEXML_ENV_SINGLE_ARG_DECL)
106
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
109
* Receive notification of the beginning of an element.
111
virtual void startElement (const ACEXML_Char *namespaceURI,
112
const ACEXML_Char *localName,
113
const ACEXML_Char *qName,
114
ACEXML_Attributes *atts ACEXML_ENV_ARG_DECL)
115
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
118
* Begin the scope of a prefix-URI Namespace mapping.
120
virtual void startPrefixMapping (const ACEXML_Char *prefix,
121
const ACEXML_Char *uri ACEXML_ENV_ARG_DECL)
122
ACE_THROW_SPEC ((ACEXML_SAXException)) = 0;
125
#include /**/ "ace/post.h"
128
#endif /* _ACEXML_CONTENTHANDLER_H_ */