//将数据更新到数据集 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); } }
//-------------------------------------------------------------------------- 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]; } }