Last change
on this file since 1193 was 1073, checked in by s10k, 7 years ago |
added XML Tools latest version (2.0d) and s10k's common libs
|
File size:
1.2 KB
|
Line | |
---|
1 | #ifndef XMLTOOLS_H
|
---|
2 | #define XMLTOOLS_H
|
---|
3 |
|
---|
4 |
|
---|
5 | #include <string>
|
---|
6 | #include <stdio.h>
|
---|
7 |
|
---|
8 | #include "utilxmltools.h"
|
---|
9 | #include "utilglobalvars.h"
|
---|
10 | #include "multidimvar.h"
|
---|
11 |
|
---|
12 | // Template got from here:
|
---|
13 | // http://www.lubby.org/ebooks/qtconsoleapp2/qtconsoleapp2.html
|
---|
14 |
|
---|
15 | // The xml library used was pugixml:
|
---|
16 | // https://code.google.com/p/pugixml/
|
---|
17 |
|
---|
18 | class XmlTools
|
---|
19 | {
|
---|
20 | public:
|
---|
21 | XmlTools(QString filesWildcard, XmlFilter filter, bool noBackups, bool noVerbose);
|
---|
22 | XmlTools(QString filesWildcard, QString xPathExpression, bool noBackups, bool noVerbose);
|
---|
23 | void addValues(QString newValues);
|
---|
24 | void removeValues(QString valuesToRemove);
|
---|
25 | void replaceValue(QString oldValue, QString newValue);
|
---|
26 | void replaceAll(QString value, QString valuePositions = "");
|
---|
27 | void updateElements(QString diffBetweenOldAndNewValue);
|
---|
28 | void invertElements();
|
---|
29 | private:
|
---|
30 | QString replaceSpecificPositions(const QString &newValue, const QString &currValues, const QString &positionsToReplace);
|
---|
31 | pugi::xml_document document;
|
---|
32 | pugi::xml_node rootNode;
|
---|
33 | QVector<QString> filesToProcess;
|
---|
34 | QString xPathExpression;
|
---|
35 | XmlFilter filters;
|
---|
36 | bool backupsEnabled, verboseEnabled;
|
---|
37 | };
|
---|
38 |
|
---|
39 | #endif // XMLTOOLS_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.