tdf#151548 ContentControls: Add Delete()
[LibreOffice.git] / include / tools / XmlWalker.hxx
blobba9d18e856a676df2814008120d9b01b4ca3017e
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/.
8 */
10 #ifndef INCLUDED_TOOLS_XMLWALKER_HXX
11 #define INCLUDED_TOOLS_XMLWALKER_HXX
13 #include <tools/toolsdllapi.h>
14 #include <rtl/string.hxx>
15 #include <memory>
17 class SvStream;
19 namespace tools
21 struct XmlWalkerImpl;
23 /**
24 * XmlWalker main purpose is to make it easier for walking the
25 * parsed XML DOM tree.
27 * It hides all the libxml2 and C -isms and makes the usage more
28 * comfortable from LO developer point of view.
31 class TOOLS_DLLPUBLIC XmlWalker final
33 private:
34 std::unique_ptr<XmlWalkerImpl> mpImpl;
36 public:
37 XmlWalker();
39 ~XmlWalker();
41 bool open(SvStream* pStream);
43 OString name();
44 OString namespaceHref();
45 OString namespacePrefix();
47 OString content();
48 void children();
49 void parent();
50 void next();
51 bool isValid() const;
52 OString attribute(const OString& sName) const;
55 } // end tools namespace
57 #endif // INCLUDED_TOOLS_XMLWRITER_HXX
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */