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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC,XPRIO autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cb73780c3cf02d45,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Reply-To: "Frank" From: "Frank" Newsgroups: comp.lang.ada Subject: XML/Ada 1.0 - SAX - Attribute converted from String to Integer Date: Sat, 27 Aug 2005 19:29:40 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 NNTP-Posting-Host: 149.80-202-220.nextgentel.com X-Original-NNTP-Posting-Host: 149.80-202-220.nextgentel.com Message-ID: <4310a326$1@news.broadpark.no> X-Trace: news.broadpark.no 1125163814 149.80-202-220.nextgentel.com (27 Aug 2005 19:30:14 +0200) Path: g2news1.google.com!news3.google.com!news.glorb.com!news-feed01.roc.ny.frontiernet.net!nntp.frontiernet.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.usenet.com!sxnews1.qg.com!nntp.gblx.net!nntp3.phx1!news.broadpark.no Xref: g2news1.google.com comp.lang.ada:4310 Date: 2005-08-27T19:29:40+02:00 List-Id: Hi! I am programming an interface that reads an XML file, that contains integers in Attributes. E.g I am using SAX from XML/Ada 1.0. I wish to retrieve the data from the attributes (e.g from height) and put them into variables of their respective types in Ada (Integers) Current solution: I have created: package XML_Integer_IO is new Ada.Text_IO.Integer_IO(Integer); I Get_Value the height fromt the element and get Unicode.CES.Byte_Sequence as result. I converted this Unicode.CES.Byte_Sequence to String Then I use Get from XML_Integer_IO to grab the integer out of the string into a Integer variable. Is this the way it should be done? I would imagine some kind of "Get_Value_As_Integer" readymade in the XML library. Frank