unit Unit1;interfaceuses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls;type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Memo1: TMemo; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); end;var Form1: TForm1;implementation{$R *.dfm}uses SuperObject, SuperXmlParser;procedure TForm1.Button1Click(Sender: TObject);var jo: ISuperObject;begin jo := XMLParseString(''); ShowMessage(jo.AsString); ShowMessage(jo['#children'].AsArray[0].AsString); ShowMessage(jo['#children'].AsArray[1].AsString); ShowMessage(jo['#children'].AsArray[0]['#children'].AsArray[0].AsString); {张三} ShowMessage(jo['#children'].AsArray[0]['#attributes.sex'].AsString); {男} ShowMessage(jo['#children'].AsArray[1]['#children'].AsArray[0].AsString); {123}end;//使用压缩procedure TForm1.Button2Click(Sender: TObject);var jo: ISuperObject;begin jo := XMLParseString(' 张三 123 ', True); ShowMessage(jo.AsString); ShowMessage(jo['Name.Name'].AsString); {张三} ShowMessage(jo['Name.sex'].AsString); {男} ShowMessage(jo['Age'].AsString); {123}end;end. 张三 123