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 #if ! defined _XMLSCRIPT_XML_IMPORT_HXX_ 24 #define _XMLSCRIPT_XML_IMPORT_HXX_ 25 26 #include "com/sun/star/xml/input/XRoot.hpp" 27 #include "com/sun/star/xml/sax/XExtendedDocumentHandler.hpp" 28 29 30 namespace xmlscript 31 { 32 33 /*############################################################################## 34 35 IMPORTING 36 37 ##############################################################################*/ 38 39 /** Creates a document handler to be used for SAX1 parser that can handle 40 namespaces. Namespace URI are mapped to integer ids for performance. 41 Implementing the XImporter interface, you will get a startRootElement() 42 for the root element of your XML document and subsequent 43 startChildElement() callbacks for each sub element. 44 Namespaces of tags are identified by their integer value. 45 46 @param xRoot 47 initial object being called for root context 48 @param bSingleThreadedUse 49 flag whether context management is synchronized. 50 @return 51 document handler for parser 52 */ 53 ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XDocumentHandler > 54 SAL_CALL createDocumentHandler( 55 ::com::sun::star::uno::Reference< 56 ::com::sun::star::xml::input::XRoot > const & xRoot, 57 bool bSingleThreadedUse = true ) 58 SAL_THROW( () ); 59 60 } 61 62 #endif 63