bump product version to 7.6.3.2-android
[LibreOffice.git] / xmlsecurity / inc / xmlsec / saxhelper.hxx
bloba49ccef1894c6bda9220597685a400265c13d3c0
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 #pragma once
22 #include <sal/config.h>
24 #include <string_view>
26 #include <libxml/tree.h>
28 #include <rtl/ustring.hxx>
30 namespace com::sun::star::xml::csax { struct XMLAttribute; }
31 namespace com::sun::star::uno { template <typename > class Sequence; }
33 /** This class represents a SAX handler which simply forwards to
34 the corresponding libxml API and translates parameter if necessary.
36 class SAXHelper final
38 private:
39 xmlParserCtxtPtr m_pParserCtxt ;
40 xmlSAXHandlerPtr m_pSaxHandler ;
42 public:
43 SAXHelper( ) ;
44 ~SAXHelper() ;
46 xmlNodePtr getCurrentNode() { return m_pParserCtxt->node;}
47 void setCurrentNode(const xmlNodePtr pNode);
48 xmlDocPtr getDocument() { return m_pParserCtxt->myDoc;}
50 /// @throws css::xml::sax::SAXException
51 /// @throws css::uno::RuntimeException
52 void startDocument() ;
54 /// @throws css::xml::sax::SAXException
55 /// @throws css::uno::RuntimeException
56 void endDocument() ;
58 /// @throws css::xml::sax::SAXException
59 /// @throws css::uno::RuntimeException
60 void startElement(
61 std::u16string_view aName ,
62 const css::uno::Sequence<
63 css::xml::csax::XMLAttribute >& aAttributes ) ;
65 /// @throws css::xml::sax::SAXException
66 /// @throws css::uno::RuntimeException
67 void endElement( std::u16string_view aName ) ;
69 /// @throws css::xml::sax::SAXException
70 /// @throws css::uno::RuntimeException
71 void characters( std::u16string_view aChars ) ;
73 /// @throws css::xml::sax::SAXException
74 /// @throws css::uno::RuntimeException
75 void ignorableWhitespace( std::u16string_view aWhitespaces ) ;
77 /// @throws css::xml::sax::SAXException
78 /// @throws css::uno::RuntimeException
79 void processingInstruction(
80 std::u16string_view aTarget ,
81 std::u16string_view aData ) ;
83 } ;
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */