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.4 required=5.0 tests=AC_FROM_MANY_DOTS,BAYES_00 autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c9d14a9b4208ef0b X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-05-20 20:30:29 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsxfer.visi.net!154.32.99.10.MISMATCH!psiuk-p2!psiuk-p3!uknet!psiuk-n!news.pace.co.uk!nh.pace.co.uk!not-for-mail From: "Marin David Condic" Newsgroups: comp.lang.ada Subject: Re: XML generator Date: Mon, 20 May 2002 14:13:48 -0400 Organization: Posted on a server owned by Pace Micro Technology plc Message-ID: References: <3CE02EE1.8FEBD4DE@despammed.com> <3CE03784.DD40698E@despammed.com> <3CE14210.AC3FC998@despammed.com> <3CE2875B.F2A54C0D@despammed.com> <3CE2DF3C.682F07C4@despammed.com> <3CE92E3E.907E487F@despammed.com> NNTP-Posting-Host: dhcp-200-133.miami.pace.co.uk X-Trace: nh.pace.co.uk 1021918430 22895 136.170.200.133 (20 May 2002 18:13:50 GMT) X-Complaints-To: newsmaster@news.cam.pace.co.uk NNTP-Posting-Date: 20 May 2002 18:13:50 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Xref: archiver1.google.com comp.lang.ada:24448 Date: 2002-05-20T18:13:50+00:00 List-Id: Yeah. That could easily be subject to producing lots of hard to find errors. What probably works better is doing something using the DOM to create the tree. Some version of creating elements with tag names, adding attribute nodes, adding child nodes of whatever content you need & when you're done, spit it out to a file. That would be less error prone than trying to write it out in bits & pieces. The downside of the XMLAda implementation is that it isn't exactly "Object Oriented" in its realization - discriminated records instead of tagged records & inheritance. (Why? Given the DOM specification it would have seemed more natural to do it all by some kind of inheritance from a base node type...) That, and you'd have to basically do your own tree-walk to get the output unless I missed seeing an "Output this document to a file or stream" subprogram somewhere. But given the pre-packaged structure, at least you can build up the XML a piece at a time & be reasonably sure you got it right. MDC -- Marin David Condic Senior Software Engineer Pace Micro Technology Americas www.pacemicro.com Enabling the digital revolution e-Mail: marin.condic@pacemicro.com "Wes Groleau" wrote in message news:3CE92E3E.907E487F@despammed.com... > > which would presumably prevent syntax errors, > we have more like > > Write ("<"); > ... conditionals > Write ("X"); > ... conditionals > Write ( ... attributes > ...etc. > ... > ... > Write (">"); -- Let's see, which tag ends here, > -- and is it a start tag or an end tag? > > I think this illustrates why I'm looking to find > or write something different. :-)