Update ooo320-m1
[ooovba.git] / xmlsecurity / source / xmlsec / saxhelper.hxx
blob2dd39837e5d7e7a75d2d38c1b519f14dbe517054
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: saxhelper.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _SAXHELPER_HXX
32 #define _SAXHELPER_HXX
34 #include "libxml/tree.h"
36 #include <com/sun/star/xml/sax/SAXException.hpp>
37 #include <com/sun/star/xml/sax/XAttributeList.hpp>
38 #include <com/sun/star/xml/sax/XLocator.hpp>
39 #include <com/sun/star/lang/XServiceInfo.hpp>
40 #include <com/sun/star/xml/csax/XMLAttribute.hpp>
42 /** This class represents a SAX handler which simply forwards to
43 the corresponding libxml API and translates parameter if necessary.
45 class SAXHelper
47 private :
48 xmlParserCtxtPtr m_pParserCtxt ;
49 xmlSAXHandlerPtr m_pSaxHandler ;
51 public:
52 SAXHelper( ) ;
53 virtual ~SAXHelper() ;
55 xmlNodePtr getCurrentNode();
56 void setCurrentNode(const xmlNodePtr pNode);
57 xmlDocPtr getDocument();
59 void startDocument( void )
60 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
62 void endDocument( void )
63 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
65 void startElement(
66 const ::rtl::OUString& aName ,
67 const com::sun::star::uno::Sequence<
68 com::sun::star::xml::csax::XMLAttribute >& aAttributes )
69 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
71 void endElement( const ::rtl::OUString& aName )
72 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
74 void characters( const ::rtl::OUString& aChars )
75 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
77 void ignorableWhitespace( const ::rtl::OUString& aWhitespaces )
78 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
80 void processingInstruction(
81 const ::rtl::OUString& aTarget ,
82 const ::rtl::OUString& aData )
83 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
85 void setDocumentLocator( const ::com::sun::star::uno::Reference<
86 ::com::sun::star::xml::sax::XLocator > & xLocator )
87 throw( ::com::sun::star::xml::sax::SAXException , ::com::sun::star::uno::RuntimeException ) ;
88 } ;
90 #endif