diff --git a/Units/DelphiXMLDataBindingResources.pas b/Units/DelphiXMLDataBindingResources.pas index a6d2ad7..7d33faa 100644 --- a/Units/DelphiXMLDataBindingResources.pas +++ b/Units/DelphiXMLDataBindingResources.pas @@ -45,6 +45,7 @@ const DocumentFunctionsInterface = ' function Get%:s(ADocument: XMLIntf.IXMLDocument): IXML%:s;' + CrLf + ' function Load%:s(const AFileName: String): IXML%:s;' + CrLf + ' function Load%:sFromStream(AStream: TStream): IXML%:s;' + CrLf + + ' function Load%:sFromString(const AString: String): IXML%:s;' + CrLf + ' function New%:s: IXML%:s;' + CrLf; DocumentFunctionsImplementation = 'function Get%:s(ADocument: XMLIntf.IXMLDocument): IXML%:s;' + CrLf + @@ -67,6 +68,19 @@ const ' Result := Get%:s(doc);' + CrLf + 'end;' + CrLf + '' + CrLf + + 'function Load%:sFromString(const AString: String): IXML%:s;' + CrLf + + 'var' + CrLf + + ' stream: TStringStream;' + CrLf + + '' + CrLf + + 'begin' + CrLf + + ' stream := TStringStream.Create(AString);' + CrLf + + ' try' + CrLf + + ' Result := Load%:sFromStream(stream);' + CrLf + + ' finally' + CrLf + + ' FreeAndNil(stream);' + CrLf + + ' end;' + CrLf + + 'end;' + CrLf + + '' + CrLf + 'function New%:s: IXML%:s;' + CrLf + 'begin' + CrLf + ' Result := NewXMLDocument.' + DocumentBinding + CrLf + diff --git a/X2XMLDataBinding.dproj b/X2XMLDataBinding.dproj index 2f78b13..2ee5776 100644 --- a/X2XMLDataBinding.dproj +++ b/X2XMLDataBinding.dproj @@ -5,7 +5,7 @@ Debug AnyCPU DCC32 - X2XMLDataBinding.exe + bin\X2XMLDataBinding.exe 7.0 @@ -19,6 +19,10 @@ 7.0 3 DEBUG + bin + Lib + Lib + Lib Delphi.Personality