//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
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
解决方案 »
- 晕死了,原来没有step关键字
- 打开门户网站时的网速测试问题!
- mysql odbc 数据源配置出错
- 我想给我的程序做成3用户版、6用户版,如何限制用户使用数呢???
- zhe这个函数没反应??
- Access+ADO中是不是不支持跨表Update[][][][]帮我看看这个简单语句为什么不行
- 又来送分了,一个简单的sql语句的写法,立即结账
- 有人用过AlphaControls皮肤中的ASkin Editor 编辑器么?
- 一个近似灌水的问题?快来啊!!!!!!!!!!!!
- 一个很怪的问题!
- 如何实现给一个网页模拟点击按钮和模拟输入文字?
- 能不能在RichEdit里某行的指定坐标位置(坐标已知)插入文字,比如x=100,y=20处插入文字?
XMLDocument2.Active :=True ;
这个地方就报这个错误了