// Copyright 2005-2019 The Mumble Developers. All rights reserved. // Use of this source code is governed by a BSD-style license // that can be found in the LICENSE file at the root of the // Mumble source tree or at . #ifndef MUMBLE_MUMBLE_XMLTOOLS_H_ #define MUMBLE_MUMBLE_XMLTOOLS_H_ #include #include #include #include class XMLTools : public QObject { Q_OBJECT public: /* Recursively parse and output XHTML. * This will drop , etc, take the contents of and strip out unnecesarry styles. * It will also change into matching , or . */ static void recurseParse(QXmlStreamReader &reader, QXmlStreamWriter &writer, int ¶graphs, const QMap &opstyle, const int close = 0, bool ignore = true); /* Iterate XML and remove close-followed-by-open. * For example, make "bold with italic" into * "bold with italic" * * If the input XML is or may not be valid, a "unduplicate" tag can be used as a root element, * which will be dropped and not written to writer. * * Input XML has to be valid XML. * * Works on b, i, u, and a elements. */ static bool unduplicateTags(QXmlStreamReader &reader, QXmlStreamWriter &writer); }; #endif // XMLTOOLS_H