//XMLDocument1 :=TXMLDocument.Create(nil);
    XMLDocument2.Active :=false;
    //XMLDocument1.Active :=true;
    XMLDocument2.LoadFromFile('receive.xml');
    XMLDocument2.Active :=True ;
    pRoot := XMLDocument2.DocumentElement;
    pnodeList := pRoot.ChildNodes;
    ncount    :=pnodeList.Count;    for i:=0 to ncount-1 do
    begin
     //二级节点
       if i<>2 then
       begin
          str := pnodeList[i].NodeName;
          //1、信息系统检查知识
         if(Trim(str) =Trim('ins_object_info'))   then
             begin
               strTemp :=getCheckValue(Trim(str));
                SetLength(insInfo,5);
                if Trim(strTemp) <> '' then
                begin
                  sl :=TStringList.Create;
                  sl.Delimiter :='|';
                  sl.DelimitedText :=strTemp;
                  urlCount :=sl.Count;
                  for k := 0 to urlCount -1 do
                    begin
                       insInfo[k] :=sl[k];
                      //ShowMessage('方法返回来的 值为:'+str+#13#10+sl[k]);
                    end;
                  sl.Free;
                end;
              cnodeList :=pnodeList[i].ChildNodes;
               //增加一个二级节点
               cRoot1 := pRoot.AddChild('ins_object_knowledge');
              for j :=0 to cnodeList.Count-1 do
              begin
                cRoot3 :=cnodeList[j];
                if (j=4) or (j=5) then
                begin
                     cRoot2 :=cRoot1.AddChild('item');
                    //四级节点
                    cnodeList1 :=cRoot3.ChildNodes;
                    for l:=0 to cnodeList1.Count -1 do
                    begin
                      cRoot5 :=cnodeList1[l];
                      if (l=0) then
                      begin
                        cRoot4 := cRoot2.AddChild('ins_check_kernel_id');
                        cRoot4.Text :=cRoot5.NodeValue;
                      end;
                      if l=1 then
                      begin
                        cRoot4 :=cRoot2.AddChild('ins_tool_check');
                        cRoot4.Text :=cRoot5.NodeValue;
                      end;
                    end;
                    cRoot4 :=cRoot2.AddChild('ins_check_knowledge_instructor');
                    cRoot4 .Text :=insInfo[0]+insInfo[1];
                    cRoot4 :=cRoot2.AddChild('ins_check_expectation');
                    cRoot4.Text :=insInfo[2];
                    cRoot4 :=cRoot2.AddChild('ins_check_re');
                    cRoot4.Text :=insInfo[3]+insInfo[4];
                end;
              end;
             
             XMLDocument2.SaveToFile('result\ins_object_info.xml');
             memo2.Lines.LoadFromFile('result\ins_object_info.xml');
             //XMLDocument2.Free;
           end;
        //memo2.Lines.LoadFromFile('result\ins_object_info.xml');
      end;delphiaccesssqlwin32