Custom Query (429 matches)


Show under each result:

Results (70 - 72 of 429)

Ticket Resolution Summary Owner Reporter
#20 fixed Unable to parse two diffrent strings with the same Source and Reader. somebody alexander.basov

I've modified SAX_Events_Printer example as follow :

with Ada.Command_Line;

with League.Strings;
with XML.SAX.Input_Sources.Strings;
with XML.SAX.Simple_Readers;

with Events_Printers;
with Put_Line;
use League.Strings;
procedure Sax_Events_Printer is
   Source  : aliased XML.SAX.Input_Sources.Strings.String_Input_Source;
   Reader  : aliased XML.SAX.Simple_Readers.SAX_Simple_Reader;
   Handler : aliased Events_Printers.Events_Printer;

   X1 : Wide_Wide_String := "<A x='y'> sdfsad </A>";
   X2 : Wide_Wide_String := "<B z='q'> iopuio </B>";

   XML.SAX.Simple_Readers.Put_Line := Put_Line'Access;
   Reader.Set_Content_Handler (Handler'Unchecked_Access);
   Reader.Set_Declaration_Handler (Handler'Unchecked_Access);
   Reader.Set_DTD_Handler (Handler'Unchecked_Access);
   Reader.Set_Entity_Resolver (Handler'Unchecked_Access);
   Reader.Set_Error_Handler (Handler'Unchecked_Access);
   Reader.Set_Lexical_Handler (Handler'Unchecked_Access);

   Source.Set_String (To_Universal_String (X1));
   Reader.Parse (Source'Access);

   Source.Set_String (To_Universal_String (X2));
   Reader.Parse (Source'Access);
end Sax_Events_Printer;

When I try to run it, It prints informatation about A tag, but no any information about B tag.

>>> (Start_Element) 1:9: '' 'A' 'A'
                    '' 'x' 'x' 'y'
>>> (Characters) 1:10: ' sdfsad '
>>> (End_Element) 1:21: '' 'A' 'A'
#22 fixed ISO-8859-1 decoder somebody vadim.godunko
#25 fixed SHIFT_JIS decoder somebody vadim.godunko
Note: See TracQuery for help on using queries.