akonadi
#include <xmldocument.h>
Public Member Functions | |
XmlDocument () | |
XmlDocument (const QString &fileName) | |
Collection::List | childCollections (const QString &parentCollectionRid) const |
Collection::List | childCollections (const Collection &parentCollection) const |
Collection | collectionByRemoteId (const QString &rid) const |
QDomElement | collectionElement (const Collection &collection) const |
QDomElement | collectionElementByRemoteId (const QString &rid) const |
Collection::List | collections () const |
QDomDocument & | document () const |
bool | isValid () const |
Item | itemByRemoteId (const QString &rid, bool includePayload=true) const |
QDomElement | itemElementByRemoteId (const QString &rid) const |
Item::List | items (const Collection &collection, bool includePayload=true) const |
QString | lastError () const |
bool | loadFile (const QString &fileName) |
bool | writeToFile (const QString &fileName) const |
Detailed Description
Represents a document of the KNUT XML serialization format for Akonadi objects.
Definition at line 37 of file xmldocument.h.
Constructor & Destructor Documentation
XmlDocument::XmlDocument | ( | ) |
Creates an empty document.
Definition at line 108 of file xmldocument.cpp.
XmlDocument::XmlDocument | ( | const QString & | fileName | ) |
Creates a new XmlDocument object and calls loadFile().
- See also
- loadFile()
Definition at line 115 of file xmldocument.cpp.
Member Function Documentation
Collection::List XmlDocument::childCollections | ( | const QString & | parentCollectionRid | ) | const |
Returns immediate child collections of the specified parent collection.
- Deprecated:
- Not HRID aware, use childCollections( Akonadi::Collection ) instead
Definition at line 274 of file xmldocument.cpp.
Collection::List XmlDocument::childCollections | ( | const Collection & | parentCollection | ) | const |
Returns the immediate child collections of parentCollection
.
Definition at line 281 of file xmldocument.cpp.
Collection XmlDocument::collectionByRemoteId | ( | const QString & | rid | ) | const |
Returns the collection with the given remote id.
Definition at line 258 of file xmldocument.cpp.
QDomElement XmlDocument::collectionElement | ( | const Collection & | collection | ) | const |
Returns the DOM element representing collection
.
Definition at line 231 of file xmldocument.cpp.
QDomElement XmlDocument::collectionElementByRemoteId | ( | const QString & | rid | ) | const |
Returns the DOM element representing the collection with the given remote id.
- Deprecated:
- Not HRID aware, use collectionElement() instead
Definition at line 226 of file xmldocument.cpp.
Collection::List XmlDocument::collections | ( | ) | const |
Returns the collections defined in this document.
Definition at line 269 of file xmldocument.cpp.
QDomDocument & XmlDocument::document | ( | ) | const |
Returns the DOM document for this XML document.
Definition at line 221 of file xmldocument.cpp.
bool XmlDocument::isValid | ( | ) | const |
Returns true if the document could be parsed successfully.
- See also
- lastError()
Definition at line 211 of file xmldocument.cpp.
Item XmlDocument::itemByRemoteId | ( | const QString & | rid, |
bool | includePayload = true |
||
) | const |
Returns the item with the given remote id.
Definition at line 264 of file xmldocument.cpp.
QDomElement XmlDocument::itemElementByRemoteId | ( | const QString & | rid | ) | const |
Returns the DOM element representing the item with the given remote id.
Definition at line 253 of file xmldocument.cpp.
Item::List XmlDocument::items | ( | const Collection & | collection, |
bool | includePayload = true |
||
) | const |
Returns the items in the given collection.
Definition at line 305 of file xmldocument.cpp.
QString XmlDocument::lastError | ( | ) | const |
Returns the last error occurred during file loading/parsing.
Empty if isValid() returns true
.
- See also
- isValid()
Definition at line 216 of file xmldocument.cpp.
bool Akonadi::XmlDocument::loadFile | ( | const QString & | fileName | ) |
Parses the given XML file and validates it.
In case of an error, isValid() will return false
and lastError() will return an error message.
- See also
- isValid(), lastError()
Definition at line 126 of file xmldocument.cpp.
bool XmlDocument::writeToFile | ( | const QString & | fileName | ) | const |
Writes the current document into the given file.
Definition at line 197 of file xmldocument.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 23:00:29 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.