예제 #1
1
//将数据更新到数据集
void	__fastcall ASEditSvr::toXML(_di_IXMLNode aNode){
   ASEditDataSet *lObj;
   for(int i=0;i<EditDS->Count;i++){
	  _di_IXMLNode lNode = aNode->AddChild(WideString("DATASET"));
	  lObj = EditDS->ObjByIndex[i];
	  BLNODEATTSET(lNode,"CODE",lObj->Code);
	  BLNODEATTSET(lNode,"ERI",lObj->DataSetSvr->ERI);
	  lObj->DataSetSvr->toXML(lNode);
   }
}
예제 #2
0
파일: main.cpp 프로젝트: adoggie/5173.com
void TForm1::initAlertFilter(RegExEntryList& filter, _di_IXMLNode node) {
	_di_IXMLNodeList nodes = node->ChildNodes;
	int n;
	for (n = 0; n < nodes->Count; n++) {
		node = nodes->Nodes[n];
		if (node->GetNodeName() == "regex") {

			nodes = node->ChildNodes;
			for (n = 0; n < nodes->Count; n++) {
				node = nodes->Nodes[n]; // 匹配正则表达式<r/>
				RegExEntry rex;
				rex.exs = node->GetNodeValue();
				filter.push_back(rex);
			}
		}
	}
}
예제 #3
0
//--------------------------------------------------------------------------
void TAnalysis::WriteMe(_di_IXMLNode & node)
{
	int row = m_grid->RowCount;

	_di_IXMLNode myNode = node->AddChild("Analysis");

	if( m_FileAnalysis->Visible){
		_di_IXMLNode fileNode = myNode->AddChild("Files");
		fileNode->Text = "true";

		_di_IXMLNode countFiles = myNode->AddChild("Count_Files");
		countFiles->Text = m_countFiles->Caption;
	}

	if( m_SearchNodes->Visible){
		_di_IXMLNode SearchNode = myNode->AddChild("Search");
		SearchNode->Text = "true";

		_di_IXMLNode countNodes = myNode->AddChild("Count_Nodes");
		countNodes->Text = m_quantNodes->Caption;
	}

		_di_IXMLNode gridNode = myNode->AddChild(m_grid->ClassName());

		_di_IXMLNode rowNode = gridNode->AddChild("Rows");
		rowNode->Text = IntToStr(row-1);

		for(int i = 1; i < row; i++)
		{
			_di_IXMLNode objectNode = gridNode->AddChild("Object_" + IntToStr(i));
			objectNode->Text = m_grid->Cells[1][i];

			_di_IXMLNode valueNode = gridNode->AddChild("Value_" + IntToStr(i));
			valueNode->Text = m_grid->Cells[2][i];
		}
}