1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef SYNDICATION_ATOM_TOOLS_H
9#define SYNDICATION_ATOM_TOOLS_H
10
11class QString;
12
13namespace Syndication
14{
15class ElementWrapper;
16
17namespace Atom
18{
19/**
20 * extracts the content of an @c atomTextConstruct. An atomTextConstruct is an element containing
21 * either plain text, escaped html, or embedded XHTML.
22 *
23 * TODO: examples
24 *
25 * @param parent the parent element to extract from. E.g. an atom:entry element.
26 * @param tagname the child element of parent to extract from the text from.
27 * Atom namespace is assumed. Example: &lt;atom:title>
28 * @return the HTMLized version of the element content. If the content is
29 * escaped HTML, the escaped markup is resolved. If it is XHTML, the XHTML
30 * content is converted to a string. If it is plain text, characters like "&lt;", ">", "&amp;"
31 * are escaped so the return string is valid HTML.
32 */
33QString extractAtomText(const Syndication::ElementWrapper &parent, const QString &tagname);
34
35} // namespace Atom
36} // namespace Syndication
37
38#endif // SYNDICATION_ATOM_TOOLS_H
39

source code of syndication/src/atom/atomtools.h