1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _I_XML_PARSER_EVENT_HANDLER_HXX_
30 #define _I_XML_PARSER_EVENT_HANDLER_HXX_
36 #if defined(XML_UNICODE) || defined(XML_UNICODE_WCHAR_T)
37 typedef std::wstring string_t
;
39 typedef std::string string_t
;
42 // name-value container
43 typedef std::map
<string_t
, string_t
> xml_tag_attribute_container_t
;
46 class i_xml_parser_event_handler
49 virtual ~i_xml_parser_event_handler() {};
51 virtual void start_document() = 0;
53 virtual void end_document() = 0;
55 virtual void start_element(
56 const string_t
& raw_name
,
57 const string_t
& local_name
,
58 const xml_tag_attribute_container_t
& attributes
) = 0;
60 virtual void end_element(
61 const string_t
& raw_name
,
62 const string_t
& local_name
) = 0;
64 virtual void characters(
65 const string_t
& character
) = 0;
67 virtual void ignore_whitespace(
68 const string_t
& whitespaces
) = 0;
70 virtual void processing_instruction(
71 const string_t
& target
, const string_t
& data
) = 0;
73 virtual void comment(const string_t
& comment
) = 0;
78 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */