1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_xml_sax_XParser_idl__ 24#define __com_sun_star_xml_sax_XParser_idl__ 25 26#ifndef __com_sun_star_uno_XInterface_idl__ 27#include <com/sun/star/uno/XInterface.idl> 28#endif 29 30#ifndef __com_sun_star_xml_sax_InputSource_idl__ 31#include <com/sun/star/xml/sax/InputSource.idl> 32#endif 33 34#ifndef __com_sun_star_xml_sax_SAXException_idl__ 35#include <com/sun/star/xml/sax/SAXException.idl> 36#endif 37 38#ifndef __com_sun_star_io_IOException_idl__ 39#include <com/sun/star/io/IOException.idl> 40#endif 41 42#ifndef __com_sun_star_xml_sax_XDocumentHandler_idl__ 43#include <com/sun/star/xml/sax/XDocumentHandler.idl> 44#endif 45 46#ifndef __com_sun_star_xml_sax_XErrorHandler_idl__ 47#include <com/sun/star/xml/sax/XErrorHandler.idl> 48#endif 49 50#ifndef __com_sun_star_xml_sax_XDTDHandler_idl__ 51#include <com/sun/star/xml/sax/XDTDHandler.idl> 52#endif 53 54#ifndef __com_sun_star_xml_sax_XEntityResolver_idl__ 55#include <com/sun/star/xml/sax/XEntityResolver.idl> 56#endif 57 58#ifndef __com_sun_star_lang_Locale_idl__ 59#include <com/sun/star/lang/Locale.idl> 60#endif 61 62 63//============================================================================= 64 65module com { module sun { module star { module xml { module sax { 66 67//============================================================================= 68 69/** specifies a SAX parser. 70 71 <p>This interface is an IDL version of the Java interface 72 <em>org.xml.sax.Parser</em> with some minor adaptations.</p> 73 */ 74published interface XParser: com::sun::star::uno::XInterface 75{ 76 //------------------------------------------------------------------------- 77 /** parses an XML document from a stream. 78 79 <p>Set the desired handlers before calling this method.</p> 80 */ 81 void parseStream( [in] com::sun::star::xml::sax::InputSource aInputSource ) 82 raises( com::sun::star::xml::sax::SAXException, 83 com::sun::star::io::IOException ); 84 85 //------------------------------------------------------------------------- 86 /** allows an application to register a document event handler. 87 */ 88 void setDocumentHandler( [in] com::sun::star::xml::sax::XDocumentHandler xHandler ); 89 90 //------------------------------------------------------------------------- 91 /** allows an application to register an error event handler. 92 93 <p>Note that the error handler can throw an exception when an error or 94 warning occurs. Note that an exception is thrown by the parser when 95 an unrecoverable (fatal) error occurs.</p> 96 */ 97 void setErrorHandler( [in] com::sun::star::xml::sax::XErrorHandler xHandler ); 98 99 //------------------------------------------------------------------------- 100 /** allows an application to register a DTD-Handler. 101 */ 102 void setDTDHandler( [in] com::sun::star::xml::sax::XDTDHandler xHandler ); 103 104 //------------------------------------------------------------------------- 105 /** allows an application to register a DTD-Handler. 106 */ 107 void setEntityResolver( [in] com::sun::star::xml::sax::XEntityResolver xResolver ); 108 109 //------------------------------------------------------------------------- 110 /** sets a locale specified for localization of warnings and error messages. 111 112 <p>Set the language of the error messages. Useful when the parsing 113 errors will be presented to the user.</p> 114 */ 115 void setLocale( [in] com::sun::star::lang::Locale locale ); 116}; 117 118//============================================================================= 119 120}; }; }; }; }; 121 122#endif 123