From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,a525118741961e98,start X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!u6g2000vbh.googlegroups.com!not-for-mail From: =?ISO-8859-1?Q?bj=F6rn_lundin?= Newsgroups: comp.lang.ada Subject: xml/ada dropping data when pre-defined entities are separated by space? Date: Thu, 27 Jan 2011 02:06:06 -0800 (PST) Organization: http://groups.google.com Message-ID: <05aafe44-cdd9-4c28-8e3f-24ecd9067ab3@u6g2000vbh.googlegroups.com> NNTP-Posting-Host: 83.145.50.10 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1296122767 22226 127.0.0.1 (27 Jan 2011 10:06:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 27 Jan 2011 10:06:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u6g2000vbh.googlegroups.com; posting-host=83.145.50.10; posting-account=3_reEwoAAAC163IAIrx427KYmwahFuh9 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 ( .NET CLR 3.5.30729; .NET4.0E),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:16729 Date: 2011-01-27T02:06:06-08:00 List-Id: Hi ! I wonder if anyone has encountered difficulties with xml/ada when parsing documents containing the pre-defined entities like & When having one of these, it is ok, but if two appear, separated with space, the rest of the text is dropped. This is with xml/ada 3.2.1 gpl, dowloaded 27-jan-2011 from libre of act in the output below, I'd like to se ' & DEF' as well on the first row... with Input_Sources.Strings; use Input_Sources.Strings; with Sax.Readers; use Sax.Readers; with DOM.Readers; use DOM.Readers; with DOM.Core; use DOM.Core; with DOM.Core.Documents; use DOM.Core.Documents; with DOM.Core.Nodes; use DOM.Core.Nodes; with Ada.Text_IO; with Unicode.CES.Basic_8bit; procedure Test_Xml_Dom is Xml_Str : String :=3D "ABC & & DEFABC && DEFABC _ DEF"; Input : String_Input; Reader : Tree_Reader; Doc : Document; List : Node_List; N : Node; begin Open(Xml_Str, Unicode.CES.Basic_8bit.Basic_8bit_Encoding,Input); Reader.Set_Feature(Validation_Feature, False); Reader.Set_Feature(Namespace_Feature, False); Reader.Parse(Input); Input.Close; Doc :=3D Reader.Get_Tree; List :=3D Get_Elements_By_Tag_Name(Doc, "Row"); for Index in 1 .. Length (List) loop N :=3D Item(List, Index - 1); Ada.Text_IO.Put_Line("Value of Row is: " & Node_Value (First_Child (N))); end loop; end Test_Xml_Dom; testrun: c:\>test_xml_dom.exe Value of Row is: ABC & Value of Row is: ABC && DEF Value of Row is: ABC _ DEF /Bj=F6rn