#include "domquery.h"
+
+MDomQuery::MDomQuery(const QDomDocument&start,QString path)
+{
+ construct(start.documentElement(),path);
+}
+
MDomQuery::MDomQuery(const QDomElement&start,QString path)
{
+ construct(start,path);
+}
+
+void MDomQuery::construct(const QDomElement&start,QString path)
+{
//split query
QStringList ql=path.split("/",QString::SkipEmptyParts);
//determine start mode and initialize list
/**creates the query object and executes the query*/
MDomQuery(const QDomElement&start,QString path);
+ /**creates the query object and executes the query; this is equivalent to calling the query with the document element as starting point*/
+ MDomQuery(const QDomDocument&start,QString path);
+
/**returns the search result as a single string, if there were multiple matches, they are separated by spaces*/
QString toString()const;
/**returns the search result as a list of strings, one string element per match*/
operator MDomNodeList()const{return m_result;}
private:
MDomNodeList m_result;
+
+ //helper for constructor
+ void construct(const QDomElement&start,QString path);
};
#endif
TEMPLATE = app
-TARGET = msmoke
+TARGET = ../src/msmoke
#build for debug or release?
#CONFIG += release
<!-- configure output -->
<QtClientOutput sourceDir="src" subDir="wob" priInclude="wob.pri"/>
<PHPServerOutput sourceDir="www" subDir="inc/wob" extension=".php" loader="wobload.php"/>
- <SOAPOutput sourceDir="soap" schema="magicsmoke.xs" wsdl="magicsmoke.wsdl"/>
<!-- load and parse class definitions -->
<Include file="basics.wolf"/>
return;
}
//parse it.
- QStringList rl=MDomQuery(doc.documentElement(),"/*/entry/@revision");
+ QStringList rl=MDomQuery(doc,"/*/entry/@revision");
if(rl.size()==0){
m_svnRev="unknown";
}else{
m_svnRev+=" uncertain";
return;
}
- QStringList rl=MDomQuery(doc.documentElement(),"/status/target/entry/wc-status/@item");
+ QStringList rl=MDomQuery(doc,"/status/target/entry/wc-status/@item");
bool ismod=false;
for(int i=0;i<rl.size();i++){
if(rl[i]=="unversioned" || rl[i]=="normal")continue;