jovie
#include <xmlelement.h>
Public Member Functions | |
XMLElement () | |
XMLElement (const QString &name) | |
XMLElement (const XMLElement &) | |
~XMLElement () | |
QString | attribute (const QString &attr) |
QString | endTag () |
QString | name () |
XMLElement | operator= (const XMLElement &element) |
void | setAttribute (const QString &attr, const QString &value) |
void | setName (const QString &name) |
QString | startTag () |
QString | toQString () |
Static Public Member Functions | |
static XMLElement | fromQString (const QString &str) |
Detailed Description
Definition at line 35 of file xmlelement.h.
Constructor & Destructor Documentation
XMLElement::XMLElement | ( | ) |
Constructors.
Definition at line 31 of file xmlelement.cpp.
|
explicit |
Definition at line 35 of file xmlelement.cpp.
XMLElement::~XMLElement | ( | ) |
Destructor.
Definition at line 40 of file xmlelement.cpp.
XMLElement::XMLElement | ( | const XMLElement & | element | ) |
Copy constructor.
Definition at line 45 of file xmlelement.cpp.
Member Function Documentation
QString XMLElement::attribute | ( | const QString & | attr | ) |
Get the value of an attribute.
- Parameters
-
attr The attribute.
- Returns
- The value of
- Parameters
-
attr
Definition at line 78 of file xmlelement.cpp.
QString XMLElement::endTag | ( | ) |
Get a textual representation of the closed tag that XMLElement represents.
- Returns
- A textual representation of the closed tag represented by the XMLElement.
Definition at line 71 of file xmlelement.cpp.
|
static |
Create an XMLElement from a QString.
- Parameters
-
str The QString to convert from. Must be of the following syntax- "foo name=\"bar""
Definition at line 87 of file xmlelement.cpp.
QString XMLElement::name | ( | ) |
Get the name of the tag (the text between the greater than and less than symbols).
- Returns
- the name of the tag.
Definition at line 57 of file xmlelement.cpp.
XMLElement XMLElement::operator= | ( | const XMLElement & | element | ) |
void XMLElement::setAttribute | ( | const QString & | attr, |
const QString & | value | ||
) |
Create an attribute and set its value.
- Parameters
-
attr The attribute. value The value of the attribute.
Definition at line 75 of file xmlelement.cpp.
void XMLElement::setName | ( | const QString & | name | ) |
set the name of the tag.
- Parameters
-
name the new name of the tag.
QString XMLElement::startTag | ( | ) |
Get a textual representation of the starting of the tag with all attributes and their values set out.
/// XMLElement element("elem"); /// element.addAttribute("foo", "bar"); /// element.startTag(); <- <elem foo="bar"> ///
- Returns
- A textual representation of the start of the element.
Definition at line 60 of file xmlelement.cpp.
QString XMLElement::toQString | ( | ) |
Convert to a QString.
Had issues with QMap and custom classes. For now you can just convert to/from QString and use That as the key/value pair.
- Returns
- A QString representation of the XMLAttribute.
Definition at line 82 of file xmlelement.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:32:26 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.