xref: /aoo41x/main/offapi/com/sun/star/xml/sax/XParser.idl (revision cdf0e10c)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_xml_sax_XParser_idl__
28#define __com_sun_star_xml_sax_XParser_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33
34#ifndef __com_sun_star_xml_sax_InputSource_idl__
35#include <com/sun/star/xml/sax/InputSource.idl>
36#endif
37
38#ifndef __com_sun_star_xml_sax_SAXException_idl__
39#include <com/sun/star/xml/sax/SAXException.idl>
40#endif
41
42#ifndef __com_sun_star_io_IOException_idl__
43#include <com/sun/star/io/IOException.idl>
44#endif
45
46#ifndef __com_sun_star_xml_sax_XDocumentHandler_idl__
47#include <com/sun/star/xml/sax/XDocumentHandler.idl>
48#endif
49
50#ifndef __com_sun_star_xml_sax_XErrorHandler_idl__
51#include <com/sun/star/xml/sax/XErrorHandler.idl>
52#endif
53
54#ifndef __com_sun_star_xml_sax_XDTDHandler_idl__
55#include <com/sun/star/xml/sax/XDTDHandler.idl>
56#endif
57
58#ifndef __com_sun_star_xml_sax_XEntityResolver_idl__
59#include <com/sun/star/xml/sax/XEntityResolver.idl>
60#endif
61
62#ifndef __com_sun_star_lang_Locale_idl__
63#include <com/sun/star/lang/Locale.idl>
64#endif
65
66
67//=============================================================================
68
69module com {  module sun {  module star {  module xml {  module sax {
70
71//=============================================================================
72
73/** specifies a SAX parser.
74
75	<p>This interface is an IDL version of the Java interface
76	<em>org.xml.sax.Parser</em> with some minor adaptations.</p>
77 */
78published interface XParser: com::sun::star::uno::XInterface
79{
80	//-------------------------------------------------------------------------
81	/** parses an XML document from a stream.
82
83		<p>Set the desired handlers before calling this method.</p>
84	 */
85	void parseStream( [in] com::sun::star::xml::sax::InputSource aInputSource )
86			raises( com::sun::star::xml::sax::SAXException,
87					com::sun::star::io::IOException );
88
89	//-------------------------------------------------------------------------
90	/** allows an application to register a document event handler.
91	 */
92	void setDocumentHandler( [in] com::sun::star::xml::sax::XDocumentHandler xHandler );
93
94	//-------------------------------------------------------------------------
95	/** allows an application to register an error event handler.
96
97		<p>Note that the error handler can throw an exception when an error or
98		warning occurs.  Note that an exception is thrown by the parser when
99		an unrecoverable (fatal) error occurs.</p>
100	 */
101	void setErrorHandler( [in] com::sun::star::xml::sax::XErrorHandler xHandler );
102
103	//-------------------------------------------------------------------------
104	/** allows an application to register a DTD-Handler.
105	 */
106	void setDTDHandler( [in] com::sun::star::xml::sax::XDTDHandler xHandler );
107
108	//-------------------------------------------------------------------------
109	/** allows an application to register a DTD-Handler.
110	 */
111	void setEntityResolver( [in] com::sun::star::xml::sax::XEntityResolver xResolver );
112
113	//-------------------------------------------------------------------------
114	/** sets a locale specified for localization of warnings and error messages.
115
116		<p>Set the language of the error messages. Useful when the parsing
117		errors will be presented to the user.</p>
118	 */
119	void setLocale( [in] com::sun::star::lang::Locale locale );
120};
121
122//=============================================================================
123
124}; }; }; }; };
125
126#endif
127