• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeaccessibility API Reference
  • KDE Home
  • Contact Us
 

jovie

  • sources
  • kde-4.12
  • kdeaccessibility
  • jovie
  • filters
  • xhtml2ssml
xmlelement.h
Go to the documentation of this file.
1 /****************************************************************************
2  XMLElement class
3 
4  Representation of an XML element with methods for getting/setting
5  attributes and generating "opening" and "closing" tags.
6  -------------------
7  Copyright 2004 by Paul Giannaros <ceruleanblaze@gmail.com>
8  -------------------
9  Original author: Paul Giannaros <ceruleanblaze@gmail.com>
10 
11  This program is free software; you can redistribute it and/or modify
12  it under the terms of the GNU General Public License as published by
13  the Free Software Foundation; either version 2 of the License, or
14  (at your option) version 3.
15 
16  This program is distributed in the hope that it will be useful,
17  but WITHOUT ANY WARRANTY; without even the implied warranty of
18  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  GNU General Public License for more details.
20 
21  You should have received a copy of the GNU General Public License
22  along with this program; if not, write to the Free Software
23  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24  ***************************************************************************/
25 
26 #ifndef XMLELEMENT_H
27 #define XMLELEMENT_H
28 
29 #include <QtCore/QMap>
30 
31 class QString;
32 
33 typedef QMap<QString, QString> AttributeToValueMap;
34 
35 class XMLElement {
36 public:
37  XMLElement();
38  explicit XMLElement(const QString &name);
39  ~XMLElement();
40 
42  XMLElement(const XMLElement &);
43 
45  XMLElement operator=(const XMLElement &element);
46 
49  QString name();
50 
53  void setName(const QString &name);
54 
62  QString startTag();
63 
66  QString endTag();
67 
71  void setAttribute(const QString &attr, const QString &value);
72 
76  QString attribute(const QString &attr);
77 
82  QString toQString();
83 
86  static XMLElement fromQString(const QString &str);
87 
88 private:
90  QString m_name;
92  AttributeToValueMap m_attrmapper;
93 };
94 
95 #endif
XMLElement::setName
void setName(const QString &name)
set the name of the tag.
XMLElement::attribute
QString attribute(const QString &attr)
Get the value of an attribute.
Definition: xmlelement.cpp:78
XMLElement::operator=
XMLElement operator=(const XMLElement &element)
Assignment operator.
Definition: xmlelement.cpp:51
XMLElement::~XMLElement
~XMLElement()
Destructor.
Definition: xmlelement.cpp:40
XMLElement
Definition: xmlelement.h:35
XMLElement::XMLElement
XMLElement()
Constructors.
Definition: xmlelement.cpp:31
XMLElement::endTag
QString endTag()
Get a textual representation of the closed tag that XMLElement represents.
Definition: xmlelement.cpp:71
XMLElement::toQString
QString toQString()
Convert to a QString.
Definition: xmlelement.cpp:82
XMLElement::startTag
QString startTag()
Get a textual representation of the starting of the tag with all attributes and their values set out...
Definition: xmlelement.cpp:60
XMLElement::fromQString
static XMLElement fromQString(const QString &str)
Create an XMLElement from a QString.
Definition: xmlelement.cpp:87
XMLElement::name
QString name()
Get the name of the tag (the text between the greater than and less than symbols).
Definition: xmlelement.cpp:57
XMLElement::setAttribute
void setAttribute(const QString &attr, const QString &value)
Create an attribute and set its value.
Definition: xmlelement.cpp:75
AttributeToValueMap
QMap< QString, QString > AttributeToValueMap
Definition: xmlelement.h:31
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:32:25 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

jovie

Skip menu "jovie"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdeaccessibility API Reference

Skip menu "kdeaccessibility API Reference"
  • jovie

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal