Merge pull request #26220 from 78andyp/blurayfixes
[xbmc.git] / xbmc / utils / XBMCTinyXML2.h
blobda1983107c1b53024d0664ca0857824a7835edda
1 /*
2 * Copyright (C) 2022 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
7 */
9 #pragma once
11 #include <cstdio>
12 #include <string>
13 #include <string_view>
15 #include <tinyxml2.h>
17 class CXBMCTinyXML2 : public tinyxml2::XMLDocument
19 public:
20 CXBMCTinyXML2() = default;
21 bool LoadFile(const std::string& filename);
22 bool LoadFile(FILE* file);
23 bool SaveFile(const std::string& filename) const;
24 bool Parse(std::string_view inputdata);
25 bool Parse(std::string&& inputdata);
27 private:
28 bool ParseHelper(size_t pos, std::string&& inputdata);