kodi
XSLTUtils.h
1 /*
2  * Copyright (C) 2005-2018 Team Kodi
3  * This file is part of Kodi - https://kodi.tv
4  *
5  * SPDX-License-Identifier: GPL-2.0-or-later
6  * See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include <string>
12 
13 #include <libxslt/xslt.h>
14 #include <libxslt/xsltutils.h>
15 
16 class XSLTUtils
17 {
18 public:
19  XSLTUtils();
20  ~XSLTUtils();
21 
27  bool SetInput(const std::string& input);
28 
34  bool SetStylesheet(const std::string& stylesheet);
35 
43  bool XSLTTransform(std::string& output);
44 
45 
46 private:
47  xmlDocPtr m_xmlInput = nullptr;
48  xmlDocPtr m_xmlOutput = nullptr;
49  xmlDocPtr m_xmlStylesheet = nullptr;
50  xsltStylesheetPtr m_xsltStylesheet = nullptr;
51 };
bool SetInput(const std::string &input)
Set the input XML for an XSLT transform from a string. This sets up the XSLT transformer with some in...
Definition: XSLTUtils.cpp:72
bool XSLTTransform(std::string &output)
Perform an XSLT transform on an inbound XML document. This will apply an XSLT transformation on an in...
Definition: XSLTUtils.cpp:46
bool SetStylesheet(const std::string &stylesheet)
Set the stylesheet (XSL) for an XSLT transform from a string. This sets up the XSLT transformer with ...
Definition: XSLTUtils.cpp:80
Definition: XSLTUtils.h:16