Hosted by
|
with Ada.Unchecked_Deallocation;
with Ada.Strings.Maps; use Ada.Strings.Maps;
with Strings; use Strings;
with Messages; use Messages;
package body XML_Readers is
Tag_Terminators : Character_Set := To_Set("/?>");
procedure Initialize_XML_Reader
(This : access XML_Reader'Class) is
begin
Initialize_Token_Reader(This);
This.Word_Separators := To_Set(" /=""!?>");
This.Contexts := Create;
end Initialize_XML_Reader;
procedure Initialize_XML_Reader
(This : access XML_Reader'Class;
Filename : in String) is
begin
Initialize_Token_Reader(This, Filename);
This.Word_Separators := To_Set(" /=""!?>");
This.Contexts := Create;
end Initialize_XML_Reader;
procedure Finalize_XML_Reader
(This : access XML_Reader'Class) is
begin
Finalize_Token_Reader(This);
end Finalize_XML_Reader;
function Current_Input
return XML_Reader_Access
is
Result : XML_Reader_Access := new XML_Reader;
begin
Initialize_XML_Reader(Result);
return Result;
end Current_Input;
function Open
(Filename : in String)
return XML_Reader_Access
is
Result : XML_Reader_Access := new XML_Reader;
begin
Initialize_XML_Reader(Result, Filename);
return Result;
end Open;
|