Interface to Mendeley updater .xml script files. More...
#include <updaterscriptparser.h>
Public Member Functions | |
UpdaterScriptParser (QDomDocument &document) | |
void | merge (const QDomDocument &otherDoc) |
Merges other script with current script. More... | |
QString | setPackageName (const QString &name) |
Sets value of package name tags in the script file. More... | |
Interface to Mendeley updater .xml script files.
When UpdaterScriptParser is constructed it operates on a pre-existing QDomDocument. The QDomDocument object must remain valid or any method that operates on its contents will crash the program.
It is safe to destroy the parser after the document is destroyed.
Definition at line 40 of file updaterscriptparser.h.
void UpdaterScriptParser::merge | ( | const QDomDocument & | otherDoc | ) |
Merges other script with current script.
This method doesn't merge entire XML file, instead it is assumed that the source document is either completely empty or already a valid updater script. These nodes get merged:
The merge is done by making deep copies.
If this UpdaterScriptParser has a null document then the script will be generated by copying the otherDoc to current doc.
Definition at line 58 of file updaterscriptparser.cpp.
QString UpdaterScriptParser::setPackageName | ( | const QString & | name | ) |
Sets value of package name tags in the script file.
More than one package in script is considered an error, and the method won't make any modifications and will return error message.
Modifies following paths:
Definition at line 100 of file updaterscriptparser.cpp.