akonadi
xmldocument.cpp
67 static QDomElement findElementByRidHelper( const QDomElement &elem, const QString &rid, const QString &elemName )
157 const QString &schemaFileName = KGlobal::dirs()->findResource( "data", QLatin1String("akonadi/akonadi-xml.xsd") );
158 XmlPtr<xmlDocPtr, xmlFreeDoc> schemaDoc( xmlReadFile( schemaFileName.toLocal8Bit(), 0, XML_PARSE_NONET ) );
163 XmlPtr<xmlSchemaParserCtxtPtr, xmlSchemaFreeParserCtxt> parserContext( xmlSchemaNewDocParserCtxt( schemaDoc ) );
173 XmlPtr<xmlSchemaValidCtxtPtr, xmlSchemaFreeValidCtxt> validationContext( xmlSchemaNewValidCtxt( schema ) );
237 if ( collection.parentCollection().remoteId().isEmpty() && collection.parentCollection() != Collection::root() )
247 if ( child.tagName() == Format::Tag::collection() && child.attribute( Format::Attr::remoteId() ) == collection.remoteId() )
AKONADI_XML_EXPORT Item elementToItem(const QDomElement &elem, bool includePayload=true)
Converts an item element.
Definition: xmlreader.cpp:128
bool isValid() const
Returns true if the document could be parsed successfully.
Definition: xmldocument.cpp:211
QDomElement collectionElement(const Collection &collection) const
Returns the DOM element representing collection.
Definition: xmldocument.cpp:231
QString attribute(const QString &name, const QString &defValue) const
AKONADI_XML_EXPORT Collection::List readCollections(const QDomElement &elem)
Reads recursively all collections starting from the given DOM element.
Definition: xmlreader.cpp:72
QString errorString() const
QDomDocument & document() const
Returns the DOM document for this XML document.
Definition: xmldocument.cpp:221
bool writeToFile(const QString &fileName) const
Writes the current document into the given file.
Definition: xmldocument.cpp:197
bool loadFile(const QString &fileName)
Parses the given XML file and validates it.
Definition: xmldocument.cpp:126
AKONADI_XML_EXPORT Collection elementToCollection(const QDomElement &elem)
Converts a collection element.
Definition: xmlreader.cpp:54
int length() const
bool exists() const
QDomNodeList childNodes() const
void setParentCollection(const Collection &parent)
Set the parent collection of this object.
Definition: entity.cpp:194
QDomElement toElement() const
int count() const
void append(const T &value)
QDomElement itemElementByRemoteId(const QString &rid) const
Returns the DOM element representing the item with the given remote id.
Definition: xmldocument.cpp:253
Collection parentCollection() const
Returns the parent collection of this object.
Definition: entity.cpp:185
bool isEmpty() const
const char * constData() const
QString lastError() const
Returns the last error occurred during file loading/parsing.
Definition: xmldocument.cpp:216
QByteArray readAll()
QDomElement collectionElementByRemoteId(const QString &rid) const
Returns the DOM element representing the collection with the given remote id.
Definition: xmldocument.cpp:226
virtual bool open(QFlags< QIODevice::OpenModeFlag > mode)
Collection collectionByRemoteId(const QString &rid) const
Returns the collection with the given remote id.
Definition: xmldocument.cpp:258
QByteArray toLocal8Bit() const
bool isNull() const
Collection::List collections() const
Returns the collections defined in this document.
Definition: xmldocument.cpp:269
qint64 write(const char *data, qint64 maxSize)
QString tagName() const
Item::List items(const Collection &collection, bool includePayload=true) const
Returns the items in the given collection.
Definition: xmldocument.cpp:310
AKONADI_XML_EXPORT Tag::List readTags(const QDomElement &elem)
Reads recursively all tags starting from the given DOM element.
Definition: xmlreader.cpp:111
Item itemByRemoteId(const QString &rid, bool includePayload=true) const
Returns the item with the given remote id.
Definition: xmldocument.cpp:264
Collection::List childCollections(const QString &parentCollectionRid) const
Returns immediate child collections of the specified parent collection.
Definition: xmldocument.cpp:279
QDomNode at(int index) const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:03 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.