Version 5.2.6.1, tag libreoffice-5.2.6.1
[LibreOffice.git] / offapi / com / sun / star / xml / sax / XParser.idl
blob8b770dab07dc8908a24a80e7a52b192c38b34cb7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_xml_sax_XParser_idl__
20 #define __com_sun_star_xml_sax_XParser_idl__
22 #include <com/sun/star/uno/XInterface.idl>
24 #include <com/sun/star/xml/sax/InputSource.idl>
26 #include <com/sun/star/xml/sax/SAXException.idl>
28 #include <com/sun/star/io/IOException.idl>
30 #include <com/sun/star/xml/sax/XDocumentHandler.idl>
32 #include <com/sun/star/xml/sax/XErrorHandler.idl>
34 #include <com/sun/star/xml/sax/XDTDHandler.idl>
36 #include <com/sun/star/xml/sax/XEntityResolver.idl>
38 #include <com/sun/star/lang/Locale.idl>
42 module com { module sun { module star { module xml { module sax {
45 /** specifies a SAX parser.
47 <p>This interface is an IDL version of the Java interface
48 <em>org.xml.sax.Parser</em> with some minor adaptations.</p>
50 published interface XParser: com::sun::star::uno::XInterface
52 /** parses an XML document from a stream.
54 <p>Set the desired handlers before calling this method.</p>
56 void parseStream( [in] com::sun::star::xml::sax::InputSource aInputSource )
57 raises( com::sun::star::xml::sax::SAXException,
58 com::sun::star::io::IOException );
60 /** allows an application to register a document event handler.
62 void setDocumentHandler( [in] com::sun::star::xml::sax::XDocumentHandler xHandler );
64 /** allows an application to register an error event handler.
66 <p>Note that the error handler can throw an exception when an error or
67 warning occurs. Note that an exception is thrown by the parser when
68 an unrecoverable (fatal) error occurs.</p>
70 void setErrorHandler( [in] com::sun::star::xml::sax::XErrorHandler xHandler );
72 /** allows an application to register a DTD-Handler.
74 void setDTDHandler( [in] com::sun::star::xml::sax::XDTDHandler xHandler );
76 /** allows an application to register a DTD-Handler.
78 void setEntityResolver( [in] com::sun::star::xml::sax::XEntityResolver xResolver );
80 /** sets a locale specified for localization of warnings and error messages.
82 <p>Set the language of the error messages. Useful when the parsing
83 errors will be presented to the user.</p>
85 void setLocale( [in] com::sun::star::lang::Locale locale );
89 }; }; }; }; };
91 #endif
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */