unit uPSI_XMLObject;
{
This file has been generated by UnitParser v0.7, written by M. Knight
and updated by NP. v/d Spek and George Birbilis. 
Source Code from Carlo Kok has been used to implement various sections of
UnitParser. Components of ROPS are used in the construction of UnitParser,
code implementing the class wrapper is taken from Carlo Kok's conv utility

}
interface
 

 
uses
   SysUtils
  ,Classes
  ,uPSComponent
  ,uPSRuntime
  ,uPSCompiler
  ;
 
type 
(*----------------------------------------------------------------------------*)
  TPSImport_XMLObject = class(TPSPlugin)
  public
    procedure CompileImport1(CompExec: TPSScript); override;
    procedure ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter); override;
  end;
 
 
{ compile-time registration functions }
procedure SIRegister_TXmlObjectVerySimple(CL: TPSPascalCompiler);
procedure SIRegister_TXmlObjectNodeList(CL: TPSPascalCompiler);
procedure SIRegister_TXmlObjectNode(CL: TPSPascalCompiler);
procedure SIRegister_TXmlObjectAttributeList(CL: TPSPascalCompiler);
procedure SIRegister_TXmlObjectAttribute(CL: TPSPascalCompiler);
procedure SIRegister_TXmlObjectStreamReader(CL: TPSPascalCompiler);
procedure SIRegister_XMLObject(CL: TPSPascalCompiler);

{ run-time registration functions }
procedure RIRegister_TXmlObjectVerySimple(CL: TPSRuntimeClassImporter);
procedure RIRegister_TXmlObjectNodeList(CL: TPSRuntimeClassImporter);
procedure RIRegister_TXmlObjectNode(CL: TPSRuntimeClassImporter);
procedure RIRegister_TXmlObjectAttributeList(CL: TPSRuntimeClassImporter);
procedure RIRegister_TXmlObjectAttribute(CL: TPSRuntimeClassImporter);
procedure RIRegister_TXmlObjectStreamReader(CL: TPSRuntimeClassImporter);
procedure RIRegister_XMLObject(CL: TPSRuntimeClassImporter);

procedure Register;

implementation


uses
   XMLObject
  ;
 
 
procedure Register;
begin
  RegisterComponents('Pascal Script', [TPSImport_XMLObject]);
end;

(* === compile-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure SIRegister_TXmlObjectVerySimple(CL: TPSPascalCompiler);
begin
  //with RegClassS(CL,'TObject', 'TXmlObjectVerySimple') do
  with CL.AddClassN(CL.FindClass('TObject'),'TXmlObjectVerySimple') do
  begin
    RegisterProperty('NodeIndentStr', 'String', iptrw);
    RegisterProperty('LineBreak', 'String', iptrw);
    RegisterProperty('Options', 'TXmlOptions', iptrw);
    RegisterMethod('Constructor Create');
    RegisterMethod('Procedure Clear');
    RegisterMethod('Function AddChild( const Name : String; NodeType : TXmlNodeType) : TXmlObjectNode');
    RegisterMethod('Function CreateNode( const Name : String; NodeType : TXmlNodeType) : TXmlObjectNode');
    RegisterMethod('Function Escape( const Value : String) : String');
    RegisterMethod('Function Unescape( const Value : String) : String');
    RegisterMethod('Function LoadFromFile( const FileName : String; BufferSize : Integer) : TXmlObjectVerySimple');
    RegisterMethod('Function LoadFromStream( const Stream : TStream; BufferSize : Integer) : TXmlObjectVerySimple');
    RegisterMethod('Procedure ParseAttributes( const AttribStr : String; AttributeList : TXmlObjectAttributeList)');
    RegisterMethod('Function SaveToFile( const FileName : String) : TXmlObjectVerySimple');
    RegisterMethod('Function SaveToStream( const Stream : TStream) : TXmlObjectVerySimple');
    RegisterProperty('ChildNodes', 'TXmlObjectNodeList', iptr);
    RegisterProperty('DocumentElement', 'TXmlObjectNode', iptr);
    RegisterProperty('Encoding', 'String', iptrw);
    RegisterProperty('Header', 'TXmlObjectNode', iptr);
    RegisterProperty('PreserveWhitespace', 'Boolean', iptrw);
    RegisterProperty('StandAlone', 'String', iptrw);
    RegisterProperty('Text', 'String', iptrw);
    RegisterProperty('Version', 'String', iptrw);
    RegisterProperty('Xml', 'String', iptrw);
  end;
end;

(*----------------------------------------------------------------------------*)
procedure SIRegister_TXmlObjectNodeList(CL: TPSPascalCompiler);
begin
  //with RegClassS(CL,'TObject', 'TXmlObjectNodeList') do
  with CL.AddClassN(CL.FindClass('TObject'),'TXmlObjectNodeList') do
  begin
    RegisterMethod('Constructor Create');
    RegisterProperty('Document', 'TXmlObjectVerySimple', iptrw);
    RegisterProperty('Parent', 'TXmlObjectNode', iptrw);
    RegisterMethod('Function Add7( Value : TXmlObjectNode) : Integer;');
    RegisterMethod('Function Add8( NodeType : TXmlNodeType) : TXmlObjectNode;');
    RegisterMethod('Function Add9( const Name : String; NodeType : TXmlNodeType) : TXmlObjectNode;');
    RegisterMethod('Function Find10( const Name : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;');
    RegisterMethod('Function FindNode( const Name : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode');
    RegisterMethod('Function Find11( const Name, AttrName : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;');
    RegisterMethod('Function Find12( const Name, AttrName, AttrValue : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;');
    RegisterMethod('Function FindNodes( const Name : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNodeList');
    RegisterMethod('Function HasNode( const Name : String; NodeTypes : TXmlNodeTypes) : Boolean');
    RegisterMethod('Function Insert13( const Name : String; Position : Integer; NodeType : TXmlNodeType) : TXmlObjectNode;');
    RegisterMethod('Function FirstChild : TXmlObjectNode');
    RegisterMethod('Function NextSibling( Node : TXmlObjectNode) : TXmlObjectNode');
    RegisterMethod('Function PreviousSibling( Node : TXmlObjectNode) : TXmlObjectNode');
    RegisterMethod('Function Get( Index : Integer) : TXmlObjectNode');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure SIRegister_TXmlObjectNode(CL: TPSPascalCompiler);
begin
  //with RegClassS(CL,'TObject', 'TXmlObjectNode') do
  with CL.AddClassN(CL.FindClass('TObject'),'TXmlObjectNode') do
  begin
    RegisterProperty('AttributeList', 'TXmlObjectAttributeList', iptrw);
    RegisterProperty('ChildNodes', 'TXmlObjectNodeList', iptr);
    RegisterProperty('Name', 'String', iptrw);
    RegisterProperty('NodeType', 'TXmlNodeType', iptrw);
    RegisterProperty('Parent', 'TXmlObjectNode', iptrw);
    RegisterProperty('Text', 'String', iptrw);
    RegisterMethod('Constructor Create( ANodeType : TXmlNodeType)');
    RegisterMethod('Procedure Clear');
    RegisterMethod('Function Find2( const Name : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;');
    RegisterMethod('Function Find3( const Name, AttrName : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;');
    RegisterMethod('Function Find4( const Name, AttrName, AttrValue : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;');
    RegisterMethod('Function FindNodes( const Name : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNodeList');
    RegisterMethod('Function HasAttribute( const AttrName : String) : Boolean');
    RegisterMethod('Function HasChild( const Name : String; NodeTypes : TXmlNodeTypes) : Boolean');
    RegisterMethod('Function AddChild( const AName : String; ANodeType : TXmlNodeType) : TXmlObjectNode');
    RegisterMethod('Function InsertChild( const Name : String; Position : Integer; NodeType : TXmlNodeType) : TXmlObjectNode');
    RegisterMethod('Function SetText( const Value : String) : TXmlObjectNode');
    RegisterMethod('Function SetAttribute( const AttrName, AttrValue : String) : TXmlObjectNode');
    RegisterMethod('Function FirstChild : TXmlObjectNode');
    RegisterMethod('Function LastChild : TXmlObjectNode');
    RegisterMethod('Function NextSibling5 : TXmlObjectNode;');
    RegisterMethod('Function PreviousSibling6 : TXmlObjectNode;');
    RegisterMethod('Function HasChildNodes : Boolean');
    RegisterMethod('Function IsTextElement : Boolean');
    RegisterMethod('Function SetNodeType( Value : TXmlNodeType) : TXmlObjectNode');
    RegisterProperty('Attributes', 'String String', iptrw);
    RegisterProperty('Document', 'TXmlObjectVerySimple', iptrw);
    RegisterProperty('NodeName', 'String', iptrw);
    RegisterProperty('NodeValue', 'String', iptrw);
  end;
end;

(*----------------------------------------------------------------------------*)
procedure SIRegister_TXmlObjectAttributeList(CL: TPSPascalCompiler);
begin
  //with RegClassS(CL,'TObject', 'TXmlObjectAttributeList') do
  with CL.AddClassN(CL.FindClass('TObject'),'TXmlObjectAttributeList') do
  begin
    RegisterMethod('Constructor Create');
    RegisterProperty('Document', 'TXmlObjectVerySimple', iptrw);
    RegisterMethod('Function Add0( const Name : String) : TXmlObjectAttribute;');
    RegisterMethod('Function Find( const Name : String) : TXmlObjectAttribute');
    RegisterMethod('Procedure Delete1( const Name : String);');
    RegisterMethod('Function HasAttribute( const AttrName : String) : Boolean');
    RegisterMethod('Function AsString : String');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure SIRegister_TXmlObjectAttribute(CL: TPSPascalCompiler);
begin
  //with RegClassS(CL,'TObject', 'TXmlObjectAttribute') do
  with CL.AddClassN(CL.FindClass('TObject'),'TXmlObjectAttribute') do
  begin
    RegisterProperty('Name', 'String', iptrw);
    RegisterProperty('AttributeType', 'TXmlAttributeType', iptrw);
    RegisterMethod('Function AsString : String');
    RegisterMethod('Function Escape( const Value : String) : String');
    RegisterProperty('Value', 'String', iptrw);
  end;
end;

(*----------------------------------------------------------------------------*)
procedure SIRegister_TXmlObjectStreamReader(CL: TPSPascalCompiler);
begin
  //with RegClassS(CL,'TObject', 'TXmlObjectStreamReader') do
  with CL.AddClassN(CL.FindClass('TObject'),'TXmlObjectStreamReader') do
  begin
    RegisterMethod('Constructor Create( Stream : TStream; Encoding : TEncoding; DetectBOM : Boolean; BufferSize : Integer)');
    RegisterMethod('Function PrepareBuffer( Value : Integer) : Boolean');
    RegisterMethod('Function ReadText( const StopChars : String; Options : TExtractTextOptions) : String');
    RegisterMethod('Function FirstChar : String');
    RegisterMethod('Procedure IncCharPos( Value : Integer)');
    RegisterMethod('Function IsUppercaseText( const Value : String) : Boolean');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure SIRegister_XMLObject(CL: TPSPascalCompiler);
begin
  CL.AddClassN(CL.FindClass('TOBJECT'),'TXmlObjectVerySimple');
  CL.AddClassN(CL.FindClass('TOBJECT'),'TXmlObjectNode');
  CL.AddClassN(CL.FindClass('TOBJECT'),'TXmlObjectNodeList');
  SIRegister_TXmlObjectStreamReader(CL);
  SIRegister_TXmlObjectAttribute(CL);
  SIRegister_TXmlObjectAttributeList(CL);
  SIRegister_TXmlObjectNode(CL);
  SIRegister_TXmlObjectNodeList(CL);
  SIRegister_TXmlObjectVerySimple(CL);
end;

(* === run-time registration functions === *)
(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleXml_W(Self: TXmlObjectVerySimple; const T: String);
begin Self.Xml := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleXml_R(Self: TXmlObjectVerySimple; var T: String);
begin T := Self.Xml; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleVersion_W(Self: TXmlObjectVerySimple; const T: String);
begin Self.Version := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleVersion_R(Self: TXmlObjectVerySimple; var T: String);
begin T := Self.Version; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleText_W(Self: TXmlObjectVerySimple; const T: String);
begin Self.Text := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleText_R(Self: TXmlObjectVerySimple; var T: String);
begin T := Self.Text; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleStandAlone_W(Self: TXmlObjectVerySimple; const T: String);
begin Self.StandAlone := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleStandAlone_R(Self: TXmlObjectVerySimple; var T: String);
begin T := Self.StandAlone; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimplePreserveWhitespace_W(Self: TXmlObjectVerySimple; const T: Boolean);
begin Self.PreserveWhitespace := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimplePreserveWhitespace_R(Self: TXmlObjectVerySimple; var T: Boolean);
begin T := Self.PreserveWhitespace; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleHeader_R(Self: TXmlObjectVerySimple; var T: TXmlObjectNode);
begin T := Self.Header; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleEncoding_W(Self: TXmlObjectVerySimple; const T: String);
begin Self.Encoding := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleEncoding_R(Self: TXmlObjectVerySimple; var T: String);
begin T := Self.Encoding; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleDocumentElement_R(Self: TXmlObjectVerySimple; var T: TXmlObjectNode);
begin T := Self.DocumentElement; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleChildNodes_R(Self: TXmlObjectVerySimple; var T: TXmlObjectNodeList);
begin T := Self.ChildNodes; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleOptions_W(Self: TXmlObjectVerySimple; const T: TXmlOptions);
begin Self.Options := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleOptions_R(Self: TXmlObjectVerySimple; var T: TXmlOptions);
begin T := Self.Options; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleLineBreak_W(Self: TXmlObjectVerySimple; const T: String);
begin Self.LineBreak := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleLineBreak_R(Self: TXmlObjectVerySimple; var T: String);
begin T := Self.LineBreak; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleNodeIndentStr_W(Self: TXmlObjectVerySimple; const T: String);
begin Self.NodeIndentStr := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectVerySimpleNodeIndentStr_R(Self: TXmlObjectVerySimple; var T: String);
begin T := Self.NodeIndentStr; end;

(*----------------------------------------------------------------------------*)
Function TXmlObjectVerySimpleParseTag15_P(Self: TXmlObjectVerySimple;  const TagStr : String; var Parent : TXmlObjectNode) : TXmlObjectNode;
Begin Result := Self.ParseTag(TagStr, Parent); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectVerySimpleParseTag14_P(Self: TXmlObjectVerySimple;  Reader : TXmlObjectStreamReader; ParseText : Boolean; var Parent : TXmlObjectNode) : TXmlObjectNode;
Begin Result := Self.ParseTag(Reader, ParseText, Parent); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeListInsert13_P(Self: TXmlObjectNodeList;  const Name : String; Position : Integer; NodeType : TXmlNodeType) : TXmlObjectNode;
Begin Result := Self.Insert(Name, Position, NodeType); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeListFind12_P(Self: TXmlObjectNodeList;  const Name, AttrName, AttrValue : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;
Begin Result := Self.Find(Name, AttrName, AttrValue, NodeTypes); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeListFind11_P(Self: TXmlObjectNodeList;  const Name, AttrName : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;
Begin Result := Self.Find(Name, AttrName, NodeTypes); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeListFind10_P(Self: TXmlObjectNodeList;  const Name : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;
Begin Result := Self.Find(Name, NodeTypes); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeListAdd9_P(Self: TXmlObjectNodeList;  const Name : String; NodeType : TXmlNodeType) : TXmlObjectNode;
Begin Result := Self.Add(Name, NodeType); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeListAdd8_P(Self: TXmlObjectNodeList;  NodeType : TXmlNodeType) : TXmlObjectNode;
Begin Result := Self.Add(NodeType); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeListAdd7_P(Self: TXmlObjectNodeList;  Value : TXmlObjectNode) : Integer;
Begin Result := Self.Add(Value); END;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeListParent_W(Self: TXmlObjectNodeList; const T: TXmlObjectNode);
begin Self.Parent := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeListParent_R(Self: TXmlObjectNodeList; var T: TXmlObjectNode);
begin T := Self.Parent; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeListDocument_W(Self: TXmlObjectNodeList; const T: TXmlObjectVerySimple);
begin Self.Document := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeListDocument_R(Self: TXmlObjectNodeList; var T: TXmlObjectVerySimple);
begin T := Self.Document; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeNodeValue_W(Self: TXmlObjectNode; const T: String);
begin Self.NodeValue := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeNodeValue_R(Self: TXmlObjectNode; var T: String);
begin T := Self.NodeValue; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeNodeName_W(Self: TXmlObjectNode; const T: String);
begin Self.NodeName := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeNodeName_R(Self: TXmlObjectNode; var T: String);
begin T := Self.NodeName; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeDocument_W(Self: TXmlObjectNode; const T: TXmlObjectVerySimple);
begin Self.Document := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeDocument_R(Self: TXmlObjectNode; var T: TXmlObjectVerySimple);
begin T := Self.Document; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeAttributes_W(Self: TXmlObjectNode; const T: String; const t1: String);
begin Self.Attributes[t1] := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeAttributes_R(Self: TXmlObjectNode; var T: String; const t1: String);
begin T := Self.Attributes[t1]; end;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodePreviousSibling6_P(Self: TXmlObjectNode) : TXmlObjectNode;
Begin Result := Self.PreviousSibling; END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeNextSibling5_P(Self: TXmlObjectNode) : TXmlObjectNode;
Begin Result := Self.NextSibling; END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeFind4_P(Self: TXmlObjectNode;  const Name, AttrName, AttrValue : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;
Begin Result := Self.Find(Name, AttrName, AttrValue, NodeTypes); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeFind3_P(Self: TXmlObjectNode;  const Name, AttrName : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;
Begin Result := Self.Find(Name, AttrName, NodeTypes); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectNodeFind2_P(Self: TXmlObjectNode;  const Name : String; NodeTypes : TXmlNodeTypes) : TXmlObjectNode;
Begin Result := Self.Find(Name, NodeTypes); END;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeText_W(Self: TXmlObjectNode; const T: String);
begin Self.Text := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeText_R(Self: TXmlObjectNode; var T: String);
begin T := Self.Text; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeParent_W(Self: TXmlObjectNode; const T: TXmlObjectNode);
begin Self.Parent := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeParent_R(Self: TXmlObjectNode; var T: TXmlObjectNode);
begin T := Self.Parent; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeNodeType_W(Self: TXmlObjectNode; const T: TXmlNodeType);
begin Self.NodeType := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeNodeType_R(Self: TXmlObjectNode; var T: TXmlNodeType);
begin T := Self.NodeType; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeName_W(Self: TXmlObjectNode; const T: String);
begin Self.Name := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeName_R(Self: TXmlObjectNode; var T: String);
begin T := Self.Name; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeChildNodes_R(Self: TXmlObjectNode; var T: TXmlObjectNodeList);
begin T := Self.ChildNodes; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeAttributeList_W(Self: TXmlObjectNode; const T: TXmlObjectAttributeList);
begin Self.AttributeList := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectNodeAttributeList_R(Self: TXmlObjectNode; var T: TXmlObjectAttributeList);
begin T := Self.AttributeList; end;

(*----------------------------------------------------------------------------*)
Procedure TXmlObjectAttributeListDelete1_P(Self: TXmlObjectAttributeList;  const Name : String);
Begin Self.Delete(Name); END;

(*----------------------------------------------------------------------------*)
Function TXmlObjectAttributeListAdd0_P(Self: TXmlObjectAttributeList;  const Name : String) : TXmlObjectAttribute;
Begin Result := Self.Add(Name); END;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeListDocument_W(Self: TXmlObjectAttributeList; const T: TXmlObjectVerySimple);
begin Self.Document := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeListDocument_R(Self: TXmlObjectAttributeList; var T: TXmlObjectVerySimple);
begin T := Self.Document; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeValue_W(Self: TXmlObjectAttribute; const T: String);
begin Self.Value := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeValue_R(Self: TXmlObjectAttribute; var T: String);
begin T := Self.Value; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeAttributeType_W(Self: TXmlObjectAttribute; const T: TXmlAttributeType);
begin Self.AttributeType := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeAttributeType_R(Self: TXmlObjectAttribute; var T: TXmlAttributeType);
begin T := Self.AttributeType; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeName_W(Self: TXmlObjectAttribute; const T: String);
begin Self.Name := T; end;

(*----------------------------------------------------------------------------*)
procedure TXmlObjectAttributeName_R(Self: TXmlObjectAttribute; var T: String);
begin T := Self.Name; end;

(*----------------------------------------------------------------------------*)
procedure RIRegister_TXmlObjectVerySimple(CL: TPSRuntimeClassImporter);
begin
  with CL.Add(TXmlObjectVerySimple) do
  begin
    RegisterPropertyHelper(@TXmlObjectVerySimpleNodeIndentStr_R,@TXmlObjectVerySimpleNodeIndentStr_W,'NodeIndentStr');
    RegisterPropertyHelper(@TXmlObjectVerySimpleLineBreak_R,@TXmlObjectVerySimpleLineBreak_W,'LineBreak');
    RegisterPropertyHelper(@TXmlObjectVerySimpleOptions_R,@TXmlObjectVerySimpleOptions_W,'Options');
    RegisterVirtualConstructor(@TXmlObjectVerySimple.Create, 'Create');
    RegisterVirtualMethod(@TXmlObjectVerySimple.Clear, 'Clear');
    RegisterVirtualMethod(@TXmlObjectVerySimple.AddChild, 'AddChild');
    RegisterVirtualMethod(@TXmlObjectVerySimple.CreateNode, 'CreateNode');
    RegisterVirtualMethod(@TXmlObjectVerySimple.Escape, 'Escape');
    RegisterVirtualMethod(@TXmlObjectVerySimple.Unescape, 'Unescape');
    RegisterVirtualMethod(@TXmlObjectVerySimple.LoadFromFile, 'LoadFromFile');
    RegisterVirtualMethod(@TXmlObjectVerySimple.LoadFromStream, 'LoadFromStream');
    RegisterVirtualMethod(@TXmlObjectVerySimple.ParseAttributes, 'ParseAttributes');
    RegisterVirtualMethod(@TXmlObjectVerySimple.SaveToFile, 'SaveToFile');
    RegisterVirtualMethod(@TXmlObjectVerySimple.SaveToStream, 'SaveToStream');
    RegisterPropertyHelper(@TXmlObjectVerySimpleChildNodes_R,nil,'ChildNodes');
    RegisterPropertyHelper(@TXmlObjectVerySimpleDocumentElement_R,nil,'DocumentElement');
    RegisterPropertyHelper(@TXmlObjectVerySimpleEncoding_R,@TXmlObjectVerySimpleEncoding_W,'Encoding');
    RegisterPropertyHelper(@TXmlObjectVerySimpleHeader_R,nil,'Header');
    RegisterPropertyHelper(@TXmlObjectVerySimplePreserveWhitespace_R,@TXmlObjectVerySimplePreserveWhitespace_W,'PreserveWhitespace');
    RegisterPropertyHelper(@TXmlObjectVerySimpleStandAlone_R,@TXmlObjectVerySimpleStandAlone_W,'StandAlone');
    RegisterPropertyHelper(@TXmlObjectVerySimpleText_R,@TXmlObjectVerySimpleText_W,'Text');
    RegisterPropertyHelper(@TXmlObjectVerySimpleVersion_R,@TXmlObjectVerySimpleVersion_W,'Version');
    RegisterPropertyHelper(@TXmlObjectVerySimpleXml_R,@TXmlObjectVerySimpleXml_W,'Xml');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure RIRegister_TXmlObjectNodeList(CL: TPSRuntimeClassImporter);
begin
  with CL.Add(TXmlObjectNodeList) do
  begin
    RegisterConstructor(@TXmlObjectNodeList.Create, 'Create');
    RegisterPropertyHelper(@TXmlObjectNodeListDocument_R,@TXmlObjectNodeListDocument_W,'Document');
    RegisterPropertyHelper(@TXmlObjectNodeListParent_R,@TXmlObjectNodeListParent_W,'Parent');
    RegisterVirtualMethod(@TXmlObjectNodeListAdd7_P, 'Add7');
    RegisterVirtualMethod(@TXmlObjectNodeListAdd8_P, 'Add8');
    RegisterVirtualMethod(@TXmlObjectNodeListAdd9_P, 'Add9');
    RegisterVirtualMethod(@TXmlObjectNodeListFind10_P, 'Find10');
    RegisterVirtualMethod(@TXmlObjectNodeList.FindNode, 'FindNode');
    RegisterVirtualMethod(@TXmlObjectNodeListFind11_P, 'Find11');
    RegisterVirtualMethod(@TXmlObjectNodeListFind12_P, 'Find12');
    RegisterVirtualMethod(@TXmlObjectNodeList.FindNodes, 'FindNodes');
    RegisterVirtualMethod(@TXmlObjectNodeList.HasNode, 'HasNode');
    RegisterVirtualMethod(@TXmlObjectNodeListInsert13_P, 'Insert13');
    RegisterVirtualMethod(@TXmlObjectNodeList.FirstChild, 'FirstChild');
    RegisterVirtualMethod(@TXmlObjectNodeList.NextSibling, 'NextSibling');
    RegisterVirtualMethod(@TXmlObjectNodeList.PreviousSibling, 'PreviousSibling');
    RegisterVirtualMethod(@TXmlObjectNodeList.Get, 'Get');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure RIRegister_TXmlObjectNode(CL: TPSRuntimeClassImporter);
begin
  with CL.Add(TXmlObjectNode) do
  begin
    RegisterPropertyHelper(@TXmlObjectNodeAttributeList_R,@TXmlObjectNodeAttributeList_W,'AttributeList');
    RegisterPropertyHelper(@TXmlObjectNodeChildNodes_R,nil,'ChildNodes');
    RegisterPropertyHelper(@TXmlObjectNodeName_R,@TXmlObjectNodeName_W,'Name');
    RegisterPropertyHelper(@TXmlObjectNodeNodeType_R,@TXmlObjectNodeNodeType_W,'NodeType');
    RegisterPropertyHelper(@TXmlObjectNodeParent_R,@TXmlObjectNodeParent_W,'Parent');
    RegisterPropertyHelper(@TXmlObjectNodeText_R,@TXmlObjectNodeText_W,'Text');
    RegisterVirtualConstructor(@TXmlObjectNode.Create, 'Create');
    RegisterMethod(@TXmlObjectNode.Clear, 'Clear');
    RegisterVirtualMethod(@TXmlObjectNodeFind2_P, 'Find2');
    RegisterVirtualMethod(@TXmlObjectNodeFind3_P, 'Find3');
    RegisterVirtualMethod(@TXmlObjectNodeFind4_P, 'Find4');
    RegisterVirtualMethod(@TXmlObjectNode.FindNodes, 'FindNodes');
    RegisterVirtualMethod(@TXmlObjectNode.HasAttribute, 'HasAttribute');
    RegisterVirtualMethod(@TXmlObjectNode.HasChild, 'HasChild');
    RegisterVirtualMethod(@TXmlObjectNode.AddChild, 'AddChild');
    RegisterVirtualMethod(@TXmlObjectNode.InsertChild, 'InsertChild');
    RegisterVirtualMethod(@TXmlObjectNode.SetText, 'SetText');
    RegisterVirtualMethod(@TXmlObjectNode.SetAttribute, 'SetAttribute');
    RegisterVirtualMethod(@TXmlObjectNode.FirstChild, 'FirstChild');
    RegisterVirtualMethod(@TXmlObjectNode.LastChild, 'LastChild');
    RegisterVirtualMethod(@TXmlObjectNodeNextSibling5_P, 'NextSibling5');
    RegisterVirtualMethod(@TXmlObjectNodePreviousSibling6_P, 'PreviousSibling6');
    RegisterVirtualMethod(@TXmlObjectNode.HasChildNodes, 'HasChildNodes');
    RegisterVirtualMethod(@TXmlObjectNode.IsTextElement, 'IsTextElement');
    RegisterVirtualMethod(@TXmlObjectNode.SetNodeType, 'SetNodeType');
    RegisterPropertyHelper(@TXmlObjectNodeAttributes_R,@TXmlObjectNodeAttributes_W,'Attributes');
    RegisterPropertyHelper(@TXmlObjectNodeDocument_R,@TXmlObjectNodeDocument_W,'Document');
    RegisterPropertyHelper(@TXmlObjectNodeNodeName_R,@TXmlObjectNodeNodeName_W,'NodeName');
    RegisterPropertyHelper(@TXmlObjectNodeNodeValue_R,@TXmlObjectNodeNodeValue_W,'NodeValue');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure RIRegister_TXmlObjectAttributeList(CL: TPSRuntimeClassImporter);
begin
  with CL.Add(TXmlObjectAttributeList) do
  begin
    RegisterConstructor(@TXmlObjectAttributeList.Create, 'Create');
    RegisterPropertyHelper(@TXmlObjectAttributeListDocument_R,@TXmlObjectAttributeListDocument_W,'Document');
    RegisterVirtualMethod(@TXmlObjectAttributeListAdd0_P, 'Add0');
    RegisterVirtualMethod(@TXmlObjectAttributeList.Find, 'Find');
    RegisterVirtualMethod(@TXmlObjectAttributeListDelete1_P, 'Delete1');
    RegisterVirtualMethod(@TXmlObjectAttributeList.HasAttribute, 'HasAttribute');
    RegisterVirtualMethod(@TXmlObjectAttributeList.AsString, 'AsString');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure RIRegister_TXmlObjectAttribute(CL: TPSRuntimeClassImporter);
begin
  with CL.Add(TXmlObjectAttribute) do
  begin
    RegisterPropertyHelper(@TXmlObjectAttributeName_R,@TXmlObjectAttributeName_W,'Name');
    RegisterPropertyHelper(@TXmlObjectAttributeAttributeType_R,@TXmlObjectAttributeAttributeType_W,'AttributeType');
    RegisterMethod(@TXmlObjectAttribute.AsString, 'AsString');
    RegisterVirtualMethod(@TXmlObjectAttribute.Escape, 'Escape');
    RegisterPropertyHelper(@TXmlObjectAttributeValue_R,@TXmlObjectAttributeValue_W,'Value');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure RIRegister_TXmlObjectStreamReader(CL: TPSRuntimeClassImporter);
begin
  with CL.Add(TXmlObjectStreamReader) do
  begin
    RegisterConstructor(@TXmlObjectStreamReader.Create, 'Create');
    RegisterMethod(@TXmlObjectStreamReader.PrepareBuffer, 'PrepareBuffer');
    RegisterVirtualMethod(@TXmlObjectStreamReader.ReadText, 'ReadText');
    RegisterMethod(@TXmlObjectStreamReader.FirstChar, 'FirstChar');
    RegisterVirtualMethod(@TXmlObjectStreamReader.IncCharPos, 'IncCharPos');
    RegisterVirtualMethod(@TXmlObjectStreamReader.IsUppercaseText, 'IsUppercaseText');
  end;
end;

(*----------------------------------------------------------------------------*)
procedure RIRegister_XMLObject(CL: TPSRuntimeClassImporter);
begin
  with CL.Add(TXmlObjectVerySimple) do
  with CL.Add(TXmlObjectNode) do
  with CL.Add(TXmlObjectNodeList) do
  RIRegister_TXmlObjectStreamReader(CL);
  RIRegister_TXmlObjectAttribute(CL);
  RIRegister_TXmlObjectAttributeList(CL);
  RIRegister_TXmlObjectNode(CL);
  RIRegister_TXmlObjectNodeList(CL);
  RIRegister_TXmlObjectVerySimple(CL);
end;

 
 
{ TPSImport_XMLObject }
(*----------------------------------------------------------------------------*)
procedure TPSImport_XMLObject.CompileImport1(CompExec: TPSScript);
begin
  SIRegister_XMLObject(CompExec.Comp);
end;
(*----------------------------------------------------------------------------*)
procedure TPSImport_XMLObject.ExecImport1(CompExec: TPSScript; const ri: TPSRuntimeClassImporter);
begin
  RIRegister_XMLObject(ri);
end;
(*----------------------------------------------------------------------------*)
 
 
end.
