comp.lang.ada
 help / color / mirror / Atom feed
From: "Marin David Condic" <dont.bother.mcondic.auntie.spam@[acm.org>
Subject: Re: XML generator
Date: Mon, 20 May 2002 14:13:48 -0400
Date: 2002-05-20T18:13:50+00:00	[thread overview]
Message-ID: <acbecu$mbf$1@nh.pace.co.uk> (raw)
In-Reply-To: 3CE92E3E.907E487F@despammed.com

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" <wesgroleau@despammed.com> 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.  :-)






  reply	other threads:[~2002-05-20 18:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-13 21:23 XML generator Wes Groleau
2002-05-13 21:51 ` Ingo Marks
2002-05-13 22:00   ` Wes Groleau
2002-05-14 16:57     ` Wes Groleau
2002-05-15  2:59       ` Steve Doiel
2002-05-15 16:05         ` Wes Groleau
2002-05-15 16:44           ` Pascal Obry
2002-05-15 16:59             ` Marin David Condic
2002-05-15 22:20             ` Wes Groleau
2002-05-16 13:50               ` news.realtime.net
2002-05-16 14:30               ` Marin David Condic
2002-05-17  1:15                 ` Aidan Skinner
2002-05-17 13:40                   ` Marin David Condic
2002-05-18  2:32                     ` Aidan Skinner
2002-05-20 14:38                       ` Marin David Condic
2002-05-20 16:20                       ` Stephen Leake
2002-05-20 17:11                       ` Wes Groleau
2002-05-20 18:13                         ` Marin David Condic [this message]
2002-05-21 14:59                           ` Pascal Obry
2002-05-21 17:43                             ` Marin David Condic
2002-05-17 13:47                 ` Wes Groleau
2002-05-22  9:43                   ` Georg Bauhaus
2002-05-22 17:31                     ` Wes Groleau
2002-05-16  1:55           ` Steve Doiel
2002-05-16  9:49             ` Emmanuel Briot
2002-05-16 17:09             ` Wes Groleau
2002-05-19  2:54       ` David Botton
2002-05-19 20:26         ` achrist
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox