KVIrc 5.2.0
Developer APIs
XmlFunctions.h
Go to the documentation of this file.
1//=============================================================================
2//
3// File : XmlFunctions.h
4// Creation date : Fri Aug 08 18:00:00 2008 GMT by Fabio Bas
5//
6// This file is part of the KVIrc IRC client distribution
7// Copyright (C) 2008 Fabio Bas (ctrlaltca at gmail dot com)
8//
9// This program is FREE software. You can redistribute it and/or
10// modify it under the terms of the GNU General Public License
11// as published by the Free Software Foundation; either version 2
12// of the License, or (at your option) any later version.
13//
14// This program is distributed in the HOPE that it will be USEFUL,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
17// See the GNU General Public License for more details.
18//
19// You should have received a copy of the GNU General Public License
20// along with this program. If not, write to the Free Software Foundation,
21// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22//
23// Original Copyright follows:
24//=============================================================================
25
26/***************************************************************************
27 XmlFunctions.cpp - description
28 -------------------
29 begin : Sun Jul 24 2005
30 copyright : (C) 2005 by Diederik van der Boor
31 email : vdboor --at-- codingdomain.com
32 ***************************************************************************/
33
34#ifndef XMLFUNCTIONS_H
35#define XMLFUNCTIONS_H
36
37#include <QDomNode>
38#include <QDebug>
39
47{
48public:
49 // Helper function, get a specific node
50 static QDomNode getNode(const QDomNode & rootNode, const QString & path);
51 // Helper function, get the attribute text of a node
52 static QString getNodeAttribute(const QDomNode & node, const QString & attribute);
53 // Helper function, get a specific child node
54 static QDomNode getNodeChildByKey(const QDomNodeList & childNodes,
55 const QString & keyTagName, const QString & keyValue);
56 // Helper function, get the text value of a node
57 static QString getNodeValue(const QDomNode & rootNode, const QString & path);
58 // Helper function, get the source XML of a node.
59 static QString getSource(const QDomNode & node, int indent = 0);
60};
61
62#endif
Definition XmlFunctions.h:47
static QDomNode getNodeChildByKey(const QDomNodeList &childNodes, const QString &keyTagName, const QString &keyValue)
Definition XmlFunctions.cpp:77
static QDomNode getNode(const QDomNode &rootNode, const QString &path)
Definition XmlFunctions.cpp:40
static QString getNodeAttribute(const QDomNode &node, const QString &attribute)
Definition XmlFunctions.cpp:68
static QString getNodeValue(const QDomNode &rootNode, const QString &path)
Definition XmlFunctions.cpp:98
static QString getSource(const QDomNode &node, int indent=0)
Definition XmlFunctions.cpp:113