Home > Back-end >  Delphi7 unit, writing, speaking, reading and writing XML tip: program is wrong, can not complete the
Delphi7 unit, writing, speaking, reading and writing XML tip: program is wrong, can not complete the

Time:09-27

This is I write:
The unit Unit_loadXml;

Interface

USES the
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, xmldom XMLIntf, StdCtrls msxmldom, XMLDoc;

Type
TForm1=class (TForm)
XMLDocument1: TXMLDocument;
Memo1: TMemo;
Procedure LoadXML (XMLStr: string);
Private
{Private declarations}
Public
{Public declarations}
The end;
Var
Form1: TForm1;
Implementation

{$R *. DFM}
Procedure TForm1. LoadXML (XMLStr: string);
Var

Xmldoc: IXMLDocument;
RNode usrNode: IXMLDOMNode;
I: Integer;
The begin
Xmldoc:=IXMLDocument. Create;
xmldoc. Se
The end;

End.


Below is an example of an online images,


Beginner! For each great god guidance!

CodePudding user response:

I wrote rNode:=xmldoc knock point, will prompt program I have been wrong, can not complete the call

CodePudding user response:

 Memo1. The Clear; 
XMLDocument1. LoadFromFile (MainPath + '20140606. XML);//reads the XML file
Memo1. Lines. Text:=FormatXMLData (XMLDocument1. XML. The Text).//see the formatted text

Read in an XML file, and, according to the format