|
@@ -21,11 +21,18 @@ unit xmlread;
|
|
|
|
|
|
interface
|
|
interface
|
|
|
|
|
|
-uses DOM;
|
|
|
|
|
|
+uses classes, DOM;
|
|
|
|
|
|
|
|
+function ReadXMLFile(const AFileName: String): TXMLDocument;
|
|
function ReadXMLFile(var f: File): TXMLDocument;
|
|
function ReadXMLFile(var f: File): TXMLDocument;
|
|
|
|
+function ReadXMLFile(var f: TStream): TXMLDocument;
|
|
|
|
+
|
|
|
|
+function ReadDTDFile(const AFileName: String): TXMLDocument;
|
|
function ReadDTDFile(var f: File): TXMLDocument;
|
|
function ReadDTDFile(var f: File): TXMLDocument;
|
|
|
|
+function ReadDTDFile(var f: TStream): TXMLDocument;
|
|
|
|
+
|
|
|
|
|
|
|
|
+// =======================================================
|
|
|
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
@@ -61,17 +68,17 @@ type
|
|
function ExpectName: String; // [5]
|
|
function ExpectName: String; // [5]
|
|
procedure ExpectAttValue(attr: TDOMAttr); // [10]
|
|
procedure ExpectAttValue(attr: TDOMAttr); // [10]
|
|
function ExpectPubidLiteral: String; // [12]
|
|
function ExpectPubidLiteral: String; // [12]
|
|
- function ParseComment: Boolean; // [15]
|
|
|
|
|
|
+ function ParseComment(AOwner: TDOMNode): Boolean; // [15]
|
|
function ParsePI: Boolean; // [16]
|
|
function ParsePI: Boolean; // [16]
|
|
procedure ExpectProlog; // [22]
|
|
procedure ExpectProlog; // [22]
|
|
function ParseEq: Boolean; // [25]
|
|
function ParseEq: Boolean; // [25]
|
|
procedure ExpectEq;
|
|
procedure ExpectEq;
|
|
- procedure ParseMisc; // [27]
|
|
|
|
|
|
+ procedure ParseMisc(AOwner: TDOMNode); // [27]
|
|
function ParseMarkupDecl: Boolean; // [29]
|
|
function ParseMarkupDecl: Boolean; // [29]
|
|
- function ParseElement(owner: TDOMNode): Boolean; // [39]
|
|
|
|
- procedure ExpectElement(owner: TDOMNode);
|
|
|
|
- function ParseReference: Boolean; // [67]
|
|
|
|
- procedure ExpectReference;
|
|
|
|
|
|
+ function ParseElement(AOwner: TDOMNode): Boolean; // [39]
|
|
|
|
+ procedure ExpectElement(AOwner: TDOMNode);
|
|
|
|
+ function ParseReference(AOwner: TDOMNode): Boolean; // [67]
|
|
|
|
+ procedure ExpectReference(AOwner: TDOMNode);
|
|
function ParsePEReference: Boolean; // [69]
|
|
function ParsePEReference: Boolean; // [69]
|
|
function ParseExternalID: Boolean; // [75]
|
|
function ParseExternalID: Boolean; // [75]
|
|
procedure ExpectExternalID;
|
|
procedure ExpectExternalID;
|
|
@@ -85,7 +92,6 @@ type
|
|
|
|
|
|
procedure TXMLReader.RaiseExc(descr: String);
|
|
procedure TXMLReader.RaiseExc(descr: String);
|
|
begin
|
|
begin
|
|
- WriteLn('Throwing exception: ', descr);
|
|
|
|
raise Exception.Create('In XML reader: ' + descr);
|
|
raise Exception.Create('In XML reader: ' + descr);
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -123,7 +129,10 @@ end;
|
|
|
|
|
|
function TXMLReader.CheckFor(s: PChar): Boolean;
|
|
function TXMLReader.CheckFor(s: PChar): Boolean;
|
|
begin
|
|
begin
|
|
- if buf[0] = #0 then exit(False);
|
|
|
|
|
|
+ if buf[0] = #0 then begin
|
|
|
|
+ Result := False;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
if StrLComp(buf, s, StrLen(s)) = 0 then begin
|
|
if StrLComp(buf, s, StrLen(s)) = 0 then begin
|
|
Inc(buf, StrLen(s));
|
|
Inc(buf, StrLen(s));
|
|
Result := True;
|
|
Result := True;
|
|
@@ -150,13 +159,15 @@ begin
|
|
ExpectProlog;
|
|
ExpectProlog;
|
|
LastNodeBeforeDoc := doc.LastChild;
|
|
LastNodeBeforeDoc := doc.LastChild;
|
|
ExpectElement(doc);
|
|
ExpectElement(doc);
|
|
- ParseMisc;
|
|
|
|
|
|
+ ParseMisc(doc);
|
|
|
|
|
|
|
|
+ {
|
|
if buf[0] <> #0 then begin
|
|
if buf[0] <> #0 then begin
|
|
WriteLn('=== Unparsed: ===');
|
|
WriteLn('=== Unparsed: ===');
|
|
//WriteLn(buf);
|
|
//WriteLn(buf);
|
|
WriteLn(StrLen(buf), ' chars');
|
|
WriteLn(StrLen(buf), ' chars');
|
|
end;
|
|
end;
|
|
|
|
+ }
|
|
|
|
|
|
Result := doc;
|
|
Result := doc;
|
|
end;
|
|
end;
|
|
@@ -165,8 +176,10 @@ end;
|
|
function TXMLReader.GetName(var s: String): Boolean; // [5]
|
|
function TXMLReader.GetName(var s: String): Boolean; // [5]
|
|
begin
|
|
begin
|
|
s := '';
|
|
s := '';
|
|
- if not (buf[0] in (Letter + ['_', ':'])) then
|
|
|
|
- exit(False);
|
|
|
|
|
|
+ if not (buf[0] in (Letter + ['_', ':'])) then begin
|
|
|
|
+ Result := False;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
|
|
s := buf[0];
|
|
s := buf[0];
|
|
Inc(buf);
|
|
Inc(buf);
|
|
@@ -196,7 +209,7 @@ begin
|
|
Inc(buf);
|
|
Inc(buf);
|
|
s := '';
|
|
s := '';
|
|
while not CheckFor(strdel) do
|
|
while not CheckFor(strdel) do
|
|
- if not ParseReference then begin
|
|
|
|
|
|
+ if not ParseReference(attr) then begin
|
|
s := s + buf[0];
|
|
s := s + buf[0];
|
|
Inc(buf);
|
|
Inc(buf);
|
|
end else begin
|
|
end else begin
|
|
@@ -224,11 +237,18 @@ begin
|
|
RaiseExc('Expected quotation marks');
|
|
RaiseExc('Expected quotation marks');
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TXMLReader.ParseComment: Boolean; // [15]
|
|
|
|
|
|
+function TXMLReader.ParseComment(AOwner: TDOMNode): Boolean; // [15]
|
|
|
|
+var
|
|
|
|
+ comment: String;
|
|
begin
|
|
begin
|
|
if CheckFor('<!--') then begin
|
|
if CheckFor('<!--') then begin
|
|
|
|
+ comment := '';
|
|
while (buf[0] <> #0) and (buf[1] <> #0) and
|
|
while (buf[0] <> #0) and (buf[1] <> #0) and
|
|
- ((buf[0] <> '-') or (buf[1] <> '-')) do Inc(buf);
|
|
|
|
|
|
+ ((buf[0] <> '-') or (buf[1] <> '-')) do begin
|
|
|
|
+ comment := comment + buf[0];
|
|
|
|
+ Inc(buf);
|
|
|
|
+ end;
|
|
|
|
+ AOwner.AppendChild(doc.CreateComment(comment));
|
|
ExpectString('-->');
|
|
ExpectString('-->');
|
|
Result := True;
|
|
Result := True;
|
|
end else
|
|
end else
|
|
@@ -302,7 +322,7 @@ begin
|
|
end;
|
|
end;
|
|
|
|
|
|
// Check for "Misc*"
|
|
// Check for "Misc*"
|
|
- ParseMisc;
|
|
|
|
|
|
+ ParseMisc(doc);
|
|
|
|
|
|
// Check for "(doctypedecl Misc*)?"
|
|
// Check for "(doctypedecl Misc*)?"
|
|
if CheckFor('<!DOCTYPE') then begin
|
|
if CheckFor('<!DOCTYPE') then begin
|
|
@@ -318,7 +338,7 @@ begin
|
|
ExpectString(']');
|
|
ExpectString(']');
|
|
SkipWhitespace;
|
|
SkipWhitespace;
|
|
end;
|
|
end;
|
|
- ParseMisc;
|
|
|
|
|
|
+ ParseMisc(doc);
|
|
end;
|
|
end;
|
|
|
|
|
|
end;
|
|
end;
|
|
@@ -349,11 +369,11 @@ end;
|
|
// Parse "Misc*":
|
|
// Parse "Misc*":
|
|
// Misc ::= Comment | PI | S
|
|
// Misc ::= Comment | PI | S
|
|
|
|
|
|
-procedure TXMLReader.ParseMisc; // [27]
|
|
|
|
|
|
+procedure TXMLReader.ParseMisc(AOwner: TDOMNode); // [27]
|
|
begin
|
|
begin
|
|
repeat
|
|
repeat
|
|
SkipWhitespace;
|
|
SkipWhitespace;
|
|
- until not (ParseComment or ParsePI);
|
|
|
|
|
|
+ until not (ParseComment(AOwner) or ParsePI);
|
|
end;
|
|
end;
|
|
|
|
|
|
function TXMLReader.ParseMarkupDecl: Boolean; // [29]
|
|
function TXMLReader.ParseMarkupDecl: Boolean; // [29]
|
|
@@ -397,7 +417,7 @@ function TXMLReader.ParseMarkupDecl: Boolean; // [29]
|
|
begin
|
|
begin
|
|
if CheckFor('<!ELEMENT') then begin
|
|
if CheckFor('<!ELEMENT') then begin
|
|
ExpectWhitespace;
|
|
ExpectWhitespace;
|
|
- WriteLn('Element decl: ', ExpectName);
|
|
|
|
|
|
+ ExpectName;
|
|
ExpectWhitespace;
|
|
ExpectWhitespace;
|
|
|
|
|
|
// Get contentspec [46]
|
|
// Get contentspec [46]
|
|
@@ -500,20 +520,25 @@ function TXMLReader.ParseMarkupDecl: Boolean; // [29]
|
|
end;
|
|
end;
|
|
|
|
|
|
function ParseEntityDecl: Boolean; // [70]
|
|
function ParseEntityDecl: Boolean; // [70]
|
|
|
|
+ var
|
|
|
|
+ NewEntity: TDOMEntity;
|
|
|
|
|
|
function ParseEntityValue: Boolean; // [9]
|
|
function ParseEntityValue: Boolean; // [9]
|
|
var
|
|
var
|
|
strdel: array[0..1] of Char;
|
|
strdel: array[0..1] of Char;
|
|
begin
|
|
begin
|
|
- if (buf[0] <> '''') and (buf[0] <> '"') then exit(False);
|
|
|
|
|
|
+ if (buf[0] <> '''') and (buf[0] <> '"') then begin
|
|
|
|
+ Result := False;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
strdel[0] := buf[0];
|
|
strdel[0] := buf[0];
|
|
strdel[1] := #0;
|
|
strdel[1] := #0;
|
|
Inc(buf);
|
|
Inc(buf);
|
|
while not CheckFor(strdel) do
|
|
while not CheckFor(strdel) do
|
|
if ParsePEReference then
|
|
if ParsePEReference then
|
|
- else if ParseReference then
|
|
|
|
|
|
+ else if ParseReference(NewEntity) then
|
|
else
|
|
else
|
|
- RaiseExc('Expected reference or PE reference');
|
|
|
|
|
|
+ RaiseExc('Expected entity or PE reference');
|
|
Result := True;
|
|
Result := True;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -522,7 +547,7 @@ function TXMLReader.ParseMarkupDecl: Boolean; // [29]
|
|
ExpectWhitespace;
|
|
ExpectWhitespace;
|
|
if CheckFor('%') then begin // [72]
|
|
if CheckFor('%') then begin // [72]
|
|
ExpectWhitespace;
|
|
ExpectWhitespace;
|
|
- ExpectName;
|
|
|
|
|
|
+ NewEntity := doc.CreateEntity(ExpectName);
|
|
ExpectWhitespace;
|
|
ExpectWhitespace;
|
|
// Get PEDef [74]
|
|
// Get PEDef [74]
|
|
if ParseEntityValue then
|
|
if ParseEntityValue then
|
|
@@ -572,7 +597,8 @@ function TXMLReader.ParseMarkupDecl: Boolean; // [29]
|
|
begin
|
|
begin
|
|
Result := False;
|
|
Result := False;
|
|
while ParseElementDecl or ParseAttlistDecl or ParseEntityDecl or
|
|
while ParseElementDecl or ParseAttlistDecl or ParseEntityDecl or
|
|
- ParseNotationDecl or ParsePI or ParseComment or SkipWhitespace do Result := True;
|
|
|
|
|
|
+ ParseNotationDecl or ParsePI or ParseComment(doc) or SkipWhitespace do
|
|
|
|
+ Result := True;
|
|
end;
|
|
end;
|
|
|
|
|
|
function TXMLReader.ProcessDTD(ABuf: PChar): TXMLDocument; // [1]
|
|
function TXMLReader.ProcessDTD(ABuf: PChar): TXMLDocument; // [1]
|
|
@@ -582,16 +608,18 @@ begin
|
|
doc := TXMLDocument.Create;
|
|
doc := TXMLDocument.Create;
|
|
ParseMarkupDecl;
|
|
ParseMarkupDecl;
|
|
|
|
|
|
|
|
+ {
|
|
if buf[0] <> #0 then begin
|
|
if buf[0] <> #0 then begin
|
|
WriteLn('=== Unparsed: ===');
|
|
WriteLn('=== Unparsed: ===');
|
|
//WriteLn(buf);
|
|
//WriteLn(buf);
|
|
WriteLn(StrLen(buf), ' chars');
|
|
WriteLn(StrLen(buf), ' chars');
|
|
end;
|
|
end;
|
|
|
|
+ }
|
|
|
|
|
|
Result := doc;
|
|
Result := doc;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TXMLReader.ParseElement(owner: TDOMNode): Boolean; // [39] [40] [44]
|
|
|
|
|
|
+function TXMLReader.ParseElement(AOwner: TDOMNode): Boolean; // [39] [40] [44]
|
|
var
|
|
var
|
|
NewElem: TDOMElement;
|
|
NewElem: TDOMElement;
|
|
|
|
|
|
@@ -616,9 +644,16 @@ var
|
|
end;
|
|
end;
|
|
|
|
|
|
function ParseCDSect: Boolean; // [18]
|
|
function ParseCDSect: Boolean; // [18]
|
|
|
|
+ var
|
|
|
|
+ cdata: String;
|
|
begin
|
|
begin
|
|
if CheckFor('<![CDATA[') then begin
|
|
if CheckFor('<![CDATA[') then begin
|
|
- while not CheckFor(']]>') do Inc(buf);
|
|
|
|
|
|
+ cdata := '';
|
|
|
|
+ while not CheckFor(']]>') do begin
|
|
|
|
+ cdata := cdata + buf[0];
|
|
|
|
+ Inc(buf);
|
|
|
|
+ end;
|
|
|
|
+ NewElem.AppendChild(doc.CreateCDATASection(cdata));
|
|
Result := True;
|
|
Result := True;
|
|
end else
|
|
end else
|
|
Result := False;
|
|
Result := False;
|
|
@@ -635,11 +670,12 @@ begin
|
|
if CheckFor('<') then begin
|
|
if CheckFor('<') then begin
|
|
if not GetName(name) then begin
|
|
if not GetName(name) then begin
|
|
buf := oldpos;
|
|
buf := oldpos;
|
|
- exit(False);
|
|
|
|
|
|
+ Result := False;
|
|
|
|
+ exit;
|
|
end;
|
|
end;
|
|
|
|
|
|
NewElem := doc.CreateElement(name);
|
|
NewElem := doc.CreateElement(name);
|
|
- owner.AppendChild(NewElem);
|
|
|
|
|
|
+ AOwner.AppendChild(NewElem);
|
|
|
|
|
|
SkipWhitespace;
|
|
SkipWhitespace;
|
|
IsEmpty := False;
|
|
IsEmpty := False;
|
|
@@ -662,7 +698,8 @@ begin
|
|
if not IsEmpty then begin
|
|
if not IsEmpty then begin
|
|
// Get content
|
|
// Get content
|
|
while SkipWhitespace or ParseCharData or ParseCDSect or ParsePI or
|
|
while SkipWhitespace or ParseCharData or ParseCDSect or ParsePI or
|
|
- ParseComment or ParseElement(NewElem) or ParseReference do;
|
|
|
|
|
|
+ ParseComment(NewElem) or ParseElement(NewElem) or
|
|
|
|
+ ParseReference(NewElem) do;
|
|
|
|
|
|
// Get ETag [42]
|
|
// Get ETag [42]
|
|
ExpectString('</');
|
|
ExpectString('</');
|
|
@@ -676,9 +713,9 @@ begin
|
|
Result := False;
|
|
Result := False;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TXMLReader.ExpectElement(owner: TDOMNode);
|
|
|
|
|
|
+procedure TXMLReader.ExpectElement(AOwner: TDOMNode);
|
|
begin
|
|
begin
|
|
- if not ParseElement(owner) then
|
|
|
|
|
|
+ if not ParseElement(AOwner) then
|
|
RaiseExc('Expected element');
|
|
RaiseExc('Expected element');
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -692,18 +729,20 @@ begin
|
|
Result := False;
|
|
Result := False;
|
|
end;
|
|
end;
|
|
|
|
|
|
-function TXMLReader.ParseReference: Boolean; // [67] [68] [69]
|
|
|
|
|
|
+function TXMLReader.ParseReference(AOwner: TDOMNode): Boolean; // [67] [68]
|
|
begin
|
|
begin
|
|
- if (buf[0] <> '&') and (buf[0] <> '%') then exit(False);
|
|
|
|
- Inc(buf);
|
|
|
|
- ExpectName;
|
|
|
|
|
|
+ if not CheckFor('&') then begin
|
|
|
|
+ Result := False;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
+ AOwner.AppendChild(doc.CreateEntityReference(ExpectName));
|
|
ExpectString(';');
|
|
ExpectString(';');
|
|
Result := True;
|
|
Result := True;
|
|
end;
|
|
end;
|
|
|
|
|
|
-procedure TXMLReader.ExpectReference;
|
|
|
|
|
|
+procedure TXMLReader.ExpectReference(AOwner: TDOMNode);
|
|
begin
|
|
begin
|
|
- if not ParseReference then
|
|
|
|
|
|
+ if not ParseReference(AOwner) then
|
|
RaiseExc('Expected reference ("&Name;" or "%Name;")');
|
|
RaiseExc('Expected reference ("&Name;" or "%Name;")');
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -788,17 +827,49 @@ var
|
|
BufSize: LongInt;
|
|
BufSize: LongInt;
|
|
begin
|
|
begin
|
|
BufSize := FileSize(f) + 1;
|
|
BufSize := FileSize(f) + 1;
|
|
- if BufSize <= 1 then exit(nil);
|
|
|
|
|
|
+ if BufSize <= 1 then begin
|
|
|
|
+ Result := nil;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
|
|
- reader := TXMLReader.Create;
|
|
|
|
GetMem(buf, BufSize);
|
|
GetMem(buf, BufSize);
|
|
BlockRead(f, buf^, BufSize - 1);
|
|
BlockRead(f, buf^, BufSize - 1);
|
|
buf[BufSize - 1] := #0;
|
|
buf[BufSize - 1] := #0;
|
|
|
|
+ reader := TXMLReader.Create;
|
|
Result := reader.ProcessXML(buf);
|
|
Result := reader.ProcessXML(buf);
|
|
FreeMem(buf, BufSize);
|
|
FreeMem(buf, BufSize);
|
|
reader.Free;
|
|
reader.Free;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function ReadXMLFile(var f: TStream): TXMLDocument;
|
|
|
|
+var
|
|
|
|
+ reader: TXMLReader;
|
|
|
|
+ buf: PChar;
|
|
|
|
+begin
|
|
|
|
+ if f.Size = 0 then begin
|
|
|
|
+ Result := nil;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ GetMem(buf, f.Size + 1);
|
|
|
|
+ f.Read(buf^, f.Size);
|
|
|
|
+ buf[f.Size] := #0;
|
|
|
|
+ reader := TXMLReader.Create;
|
|
|
|
+ Result := reader.ProcessXML(buf);
|
|
|
|
+ FreeMem(buf, f.Size + 1);
|
|
|
|
+ reader.Free;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+function ReadXMLFile(const AFileName: String): TXMLDocument;
|
|
|
|
+var
|
|
|
|
+ stream: TFileStream;
|
|
|
|
+begin
|
|
|
|
+ stream := TFileStream.Create(AFileName, fmOpenRead);
|
|
|
|
+ Result := ReadXMLFile(stream);
|
|
|
|
+ stream.Free;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+
|
|
function ReadDTDFile(var f: File): TXMLDocument;
|
|
function ReadDTDFile(var f: File): TXMLDocument;
|
|
var
|
|
var
|
|
reader: TXMLReader;
|
|
reader: TXMLReader;
|
|
@@ -806,24 +877,57 @@ var
|
|
BufSize: LongInt;
|
|
BufSize: LongInt;
|
|
begin
|
|
begin
|
|
BufSize := FileSize(f) + 1;
|
|
BufSize := FileSize(f) + 1;
|
|
- if BufSize <= 1 then exit(nil);
|
|
|
|
|
|
+ if BufSize <= 1 then begin
|
|
|
|
+ Result := nil;
|
|
|
|
+ end;
|
|
|
|
|
|
- reader := TXMLReader.Create;
|
|
|
|
GetMem(buf, BufSize + 1);
|
|
GetMem(buf, BufSize + 1);
|
|
BlockRead(f, buf^, BufSize - 1);
|
|
BlockRead(f, buf^, BufSize - 1);
|
|
buf[BufSize - 1] := #0;
|
|
buf[BufSize - 1] := #0;
|
|
|
|
+ reader := TXMLReader.Create;
|
|
Result := reader.ProcessDTD(buf);
|
|
Result := reader.ProcessDTD(buf);
|
|
FreeMem(buf, BufSize);
|
|
FreeMem(buf, BufSize);
|
|
reader.Free;
|
|
reader.Free;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+function ReadDTDFile(var f: TStream): TXMLDocument;
|
|
|
|
+var
|
|
|
|
+ reader: TXMLReader;
|
|
|
|
+ buf: PChar;
|
|
|
|
+begin
|
|
|
|
+ if f.Size = 0 then begin
|
|
|
|
+ Result := nil;
|
|
|
|
+ exit;
|
|
|
|
+ end;
|
|
|
|
+
|
|
|
|
+ GetMem(buf, f.Size + 1);
|
|
|
|
+ f.Read(buf^, f.Size);
|
|
|
|
+ buf[f.Size] := #0;
|
|
|
|
+ reader := TXMLReader.Create;
|
|
|
|
+ Result := reader.ProcessDTD(buf);
|
|
|
|
+ FreeMem(buf, f.Size + 1);
|
|
|
|
+ reader.Free;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
+function ReadDTDFile(const AFileName: String): TXMLDocument;
|
|
|
|
+var
|
|
|
|
+ stream: TFileStream;
|
|
|
|
+begin
|
|
|
|
+ stream := TFileStream.Create(AFileName, fmOpenRead);
|
|
|
|
+ Result := ReadDTDFile(stream);
|
|
|
|
+ stream.Free;
|
|
|
|
+end;
|
|
|
|
+
|
|
|
|
|
|
end.
|
|
end.
|
|
|
|
|
|
|
|
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.2 1999-07-09 10:42:50 michael
|
|
|
|
|
|
+ Revision 1.3 1999-07-09 21:05:51 michael
|
|
|
|
+ + fixes from Guenther Sebastian
|
|
|
|
+
|
|
|
|
+ Revision 1.2 1999/07/09 10:42:50 michael
|
|
* Removed debug statements
|
|
* Removed debug statements
|
|
|
|
|
|
Revision 1.1 1999/07/09 08:35:09 michael
|
|
Revision 1.1 1999/07/09 08:35:09 michael
|