bump product version to 4.1.6.2
[LibreOffice.git] / xmlsecurity / source / xmlsec / saxhelper.hxx
blobd11b3e50520592236024583b5e9d9e271526876d
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 .
20 #ifndef _SAXHELPER_HXX
21 #define _SAXHELPER_HXX
23 #include "libxml/tree.h"
25 #include <com/sun/star/xml/sax/SAXException.hpp>
26 #include <com/sun/star/xml/sax/XAttributeList.hpp>
27 #include <com/sun/star/xml/sax/XLocator.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/xml/csax/XMLAttribute.hpp>
31 /** This class represents a SAX handler which simply forwards to
32 the corresponding libxml API and translates parameter if necessary.
34 class SAXHelper
36 private :
37 xmlParserCtxtPtr m_pParserCtxt ;
38 xmlSAXHandlerPtr m_pSaxHandler ;
40 public:
41 SAXHelper( ) ;
42 virtual ~SAXHelper() ;
44 xmlNodePtr getCurrentNode();
45 void setCurrentNode(const xmlNodePtr pNode);
46 xmlDocPtr getDocument();
48 void startDocument( void )
49 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
51 void endDocument( void )
52 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
54 void startElement(
55 const OUString& aName ,
56 const com::sun::star::uno::Sequence<
57 com::sun::star::xml::csax::XMLAttribute >& aAttributes )
58 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
60 void endElement( const OUString& aName )
61 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
63 void characters( const OUString& aChars )
64 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
66 void ignorableWhitespace( const OUString& aWhitespaces )
67 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
69 void processingInstruction(
70 const OUString& aTarget ,
71 const OUString& aData )
72 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
74 void setDocumentLocator( const ::com::sun::star::uno::Reference<
75 ::com::sun::star::xml::sax::XLocator > & xLocator )
76 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
77 } ;
79 #endif
81 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */