Changeset 518 for Common/UXMLUtils.pas
- Timestamp:
- Aug 31, 2018, 3:28:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/UXMLUtils.pas
r510 r518 7 7 uses 8 8 {$IFDEF WINDOWS}Windows,{$ENDIF} 9 Classes, SysUtils, DateUtils, DOM ;9 Classes, SysUtils, DateUtils, DOM, xmlread; 10 10 11 11 function XMLTimeToDateTime(XMLDateTime: string): TDateTime; … … 21 21 function ReadString(Node: TDOMNode; Name: string; DefaultValue: string): string; 22 22 function ReadDateTime(Node: TDOMNode; Name: string; DefaultValue: TDateTime): TDateTime; 23 procedure ReadXMLFileParser(out Doc: TXMLDocument; FileName: string); 23 24 24 25 25 26 implementation 27 28 procedure ReadXMLFileParser(out Doc: TXMLDocument; FileName: string); 29 var 30 Parser: TDOMParser; 31 Src: TXMLInputSource; 32 InFile: TFileStream; 33 begin 34 try 35 InFile := TFileStream.Create(FileName, fmOpenRead); 36 Src := TXMLInputSource.Create(InFile); 37 Parser := TDOMParser.Create; 38 Parser.Options.PreserveWhitespace := True; 39 Parser.Parse(Src, Doc); 40 finally 41 Src.Free; 42 Parser.Free; 43 InFile.Free; 44 end; 45 end; 26 46 27 47 function GetTimeZoneBias: Integer;
Note:
See TracChangeset
for help on using the changeset viewer.