00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <map>
00012 #include <string>
00013 #include <fstream>
00014 #include <iomanip>
00015 #include "ocXML.h"
00016
00017 ocString getSQL( string tag, string configFile )
00018 {
00019 string qry;
00020 ifstream templateFile( configFile.c_str() );
00021 xmlParser parser( &templateFile );
00022 parser.parse();
00023 node_vector::iterator & it = parser.findFirstNodeByName( tag );
00024 if( it != parser.nodeList().end() )
00025 {
00026 xmlNode & node = dynamic_cast<xmlNode &>(*it);
00027 qry = node.data;
00028 }
00029 return qry;
00030 }