Akonadi::XmlDocument
#include <xmldocument.h>
Public Member Functions | |
XmlDocument () | |
XmlDocument (const QString &fileName, const QString &xsdFile={}) | |
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, const QString &xsdFile={}) |
Tag::List | tags () const |
bool | writeToFile (const QString &fileName) const |
Detailed Description
Represents a document of the KNUT XML serialization format for Akonadi objects.
Definition at line 26 of file xmldocument.h.
Constructor & Destructor Documentation
◆ XmlDocument() [1/2]
XmlDocument::XmlDocument | ( | ) |
Creates an empty document.
Definition at line 100 of file xmldocument.cpp.
◆ XmlDocument() [2/2]
Creates a new XmlDocument object and calls loadFile().
- See also
- loadFile()
Definition at line 107 of file xmldocument.cpp.
Member Function Documentation
◆ childCollections()
|
nodiscard |
Returns the immediate child collections of parentCollection
.
Definition at line 274 of file xmldocument.cpp.
◆ collectionByRemoteId()
|
nodiscard |
Returns the collection with the given remote id.
Definition at line 253 of file xmldocument.cpp.
◆ collectionElement()
|
nodiscard |
Returns the DOM element representing collection
.
Definition at line 215 of file xmldocument.cpp.
◆ collectionElementByRemoteId()
|
nodiscard |
Returns the DOM element representing the collection with the given remote id.
Definition at line 248 of file xmldocument.cpp.
◆ collections()
|
nodiscard |
Returns the collections defined in this document.
Definition at line 264 of file xmldocument.cpp.
◆ document()
QDomDocument & XmlDocument::document | ( | ) | const |
Returns the DOM document for this XML document.
Definition at line 210 of file xmldocument.cpp.
◆ isValid()
|
nodiscard |
Returns true if the document could be parsed successfully.
- See also
- lastError()
Definition at line 200 of file xmldocument.cpp.
◆ itemByRemoteId()
|
nodiscard |
Returns the item with the given remote id.
Definition at line 259 of file xmldocument.cpp.
◆ itemElementByRemoteId()
|
nodiscard |
Returns the DOM element representing the item with the given remote id.
Definition at line 243 of file xmldocument.cpp.
◆ items()
|
nodiscard |
Returns the items in the given collection.
Definition at line 298 of file xmldocument.cpp.
◆ lastError()
|
nodiscard |
Returns the last error occurred during file loading/parsing.
Empty if isValid() returns true
.
- See also
- isValid()
Definition at line 205 of file xmldocument.cpp.
◆ loadFile()
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 115 of file xmldocument.cpp.
◆ tags()
|
nodiscard |
Returns the tags defined in this document.
Definition at line 269 of file xmldocument.cpp.
◆ writeToFile()
bool XmlDocument::writeToFile | ( | const QString & | fileName | ) | const |
Writes the current document into the given file.
Definition at line 186 of file xmldocument.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:03:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.