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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,47bc849aad30d586 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-02 13:52:25 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!pd9e4de6d.dip.t-dialin.NET!not-for-mail From: Gerhard =?iso-8859-15?Q?H=E4ring?= Newsgroups: comp.lang.ada Subject: Re: XML and Ada was RE: A standard package for config files is needed Date: 2 Jun 2002 20:52:24 GMT Organization: People's Front of Judea Message-ID: References: <3CFA3F25.118C9989@san.rr.com> NNTP-Posting-Host: pd9e4de6d.dip.t-dialin.net (217.228.222.109) X-Trace: fu-berlin.de 1023051144 33529793 217.228.222.109 (16 [124666]) User-Agent: slrn/0.9.7.2 (FreeBSD) Cache-Post-Path: gargamel.hqd-internal!unknown@gargamel.hqd-internal X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/) Xref: archiver1.google.com comp.lang.ada:25217 Date: 2002-06-02T20:52:24+00:00 List-Id: Preben Randhol wrote in comp.lang.ada: > On Sun, 02 Jun 2002 15:51:42 GMT, Darren New wrote: >> and CDATA). It's also easy to write simple parsers for, given the amount of >> power it provides. > > Not if you want authentication Authentication? > and want to parse the file without reading all of it into memory > first. Well, yes. Most of the time, SAX is more pain than DOM, especially in comparison to a simplified DOM API, that exploits language features instead of just using the least common (language) denominator mandated by CORBA IDL. It also forces you to write a state machine (again!), but at least you only have to override callbacks, not implement the parser itself. For multi-megabyte data sets, and even with fast parsers like expat, I still find XML parsing relatively slow. Gerhard -- mail: gerhard bigfoot de registered Linux user #64239 web: http://www.cs.fhm.edu/~ifw00065/ OpenPGP public key id 86AB43C0 public key fingerprint: DEC1 1D02 5743 1159 CD20 A4B6 7B22 6575 86AB 43C0 reduce(lambda x,y:x+y,map(lambda x:chr(ord(x)^42),tuple('zS^BED\nX_FOY\x0b')))