domutil.cpp
43 TQString DomUtil::readEntry(const TQDomDocument &doc, const TQString &path, const TQString &defaultEntry)
85 TQStringList DomUtil::readListEntry(const TQDomDocument &doc, const TQString &path, const TQString &tag)
101 DomUtil::PairList DomUtil::readPairListEntry(const TQDomDocument &doc, const TQString &path, const TQString &tag,
168 void DomUtil::writeMapEntry(TQDomDocument &doc, const TQString &path, const TQMap<TQString, TQString> &map)
static TQDomElement elementByPath(const TQDomDocument &doc, const TQString &path)
Retrieves an element by path, return null if any item along the path does not exist.
Definition: domutil.cpp:28
static bool replaceText(TQDomDocument doc, TQString pathExt, TQString text)
Replace all chilt text nodes of parent described in pathExt with one new.
Definition: domutil.cpp:360
static bool openDOMFile(TQDomDocument &doc, TQString filename)
Open file - filename - and set setContents of doc.
Definition: domutil.cpp:313
static int readIntEntry(const TQDomDocument &doc, const TQString &path, int defaultEntry=0)
Reads a number entry.
Definition: domutil.cpp:65
static void writeBoolEntry(TQDomDocument &doc, const TQString &path, bool value)
Writes a boolean entry.
Definition: domutil.cpp:186
static bool removeTextNodes(TQDomDocument doc, TQString pathExt)
Remove all child text nodes of parent described in pathExt.
Definition: domutil.cpp:337
static void makeEmpty(TQDomElement &)
Remove all child elements from a given element.
Definition: domutil.cpp:22
static void writeMapEntry(TQDomDocument &doc, const TQString &path, const TQMap< TQString, TQString > &map)
Writes a string to string map.
Definition: domutil.cpp:168
static bool readBoolEntry(const TQDomDocument &doc, const TQString &path, bool defaultEntry=false)
Reads a boolean entry.
Definition: domutil.cpp:75
Utility functions to operate on DOM.
static TQDomElement namedChildElement(TQDomElement &el, const TQString &name)
Retrieves a child element, creating it if it does not exist.
Definition: domutil.cpp:134
static TQDomElement createElementByPath(TQDomDocument &doc, const TQString &path)
Retrieves an element by path, creating the necessary nodes.
Definition: domutil.cpp:145
static void writeIntEntry(TQDomDocument &doc, const TQString &path, int value)
Writes a number entry.
Definition: domutil.cpp:180
static TQDomElement elementByPathExt(TQDomDocument &doc, const TQString &pathstring)
Retrieve an element specified with extended path examples:
Definition: domutil.cpp:259
static PairList readPairListEntry(const TQDomDocument &doc, const TQString &path, const TQString &tag, const TQString &firstAttr, const TQString &secondAttr)
Reads a list of string pairs.
Definition: domutil.cpp:101
static TQString readEntry(const TQDomDocument &doc, const TQString &path, const TQString &defaultEntry=TQString())
Reads a string entry.
Definition: domutil.cpp:43
static void writeEntry(TQDomDocument &doc, const TQString &path, const TQString &value)
Writes a string entry.
Definition: domutil.cpp:162
static bool saveDOMFile(TQDomDocument &doc, TQString filename)
Store contents of doc in file - filename.
Definition: domutil.cpp:326
static void writeListEntry(TQDomDocument &doc, const TQString &path, const TQString &tag, const TQStringList &value)
Writes a string list element.
Definition: domutil.cpp:192
static bool appendText(TQDomDocument doc, TQString pathExt, TQString text)
Add child text node to parent described in pathExt.
Definition: domutil.cpp:350
static DomPath resolvPathStringExt(const TQString pathstring)
Resolves an extended path Extended path format: pathpart: tag[|attr1=value[;attr2=value;..][|matchNumber]] where matchNumber is zero-based path: pathpart[/pathpart/..].
Definition: domutil.cpp:221
static void writePairListEntry(TQDomDocument &doc, const TQString &path, const TQString &tag, const TQString &firstAttr, const TQString &secondAttr, const PairList &value)
Writes a list of string pairs.
Definition: domutil.cpp:206
static TQMap< TQString, TQString > readMapEntry(const TQDomDocument &doc, const TQString &path)
Reads a string to string map.
Definition: domutil.cpp:120
static TQStringList readListEntry(const TQDomDocument &doc, const TQString &path, const TQString &tag)
Reads a list entry.
Definition: domutil.cpp:85