<? The XML version="1.0" encoding="GBK"?>
Procedure TForm1. Button1Click (Sender: TObject);
Var
XmlDuc: IxmlDocument;
Root: IXMLNode;
I: integer;
SName, sValue sReturnCode, sReturnMsg: string;
The begin
Try
XmlDuc:=LoadXMLDocument (' C: \ XJFP_outData XML);
XmlDuc. Active:=true;
Root:=xmlDuc. DocumentElement;
For I:=0 to root..childnodes. Do the count - 1
The begin
If not root..childnodes [I] HasAttribute (' Name ') then continue;
SName:=root.childnodes [I] the Attributes (' Name ');
SValue:=root.childnodes [I] NodeValue;
If the sName='returnCode' then
SReturnCode:=sValue;
If the sName='returnMessage' then
SReturnMsg:=sValue;
end;
ShowMessage (sReturnCode + sReturnMsg);
Except,
end;
end;
SValue:=root.childnodes [I] NodeValue; An error code in the running to this business, Element does not contain a single text node, but programs run on delphi7 normal and output the results for "9999 & lt;> <> <> Connection billing software failed, "
For XML parsing that contain CDATA is related to Delphi version, warrior, please grant instruction!