comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: XML generator
Date: 20 May 2002 12:20:25 -0400
Date: 2002-05-20T16:27:29+00:00	[thread overview]
Message-ID: <ulmaen646.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: slrnaebf9h.tev.aidan@crushed.velvet.net

Aidan Skinner <aidan@velvet.net> writes:

> I have a generic package that I'm using which takes in a type, an
> array of strings to represent the elements/propertys, and
> getproperty and setproperty methods for that type which the set
> takes two strings (the name of the property and the value to set it
> too) and the get function takes one string (the name of the
> property) and returns a string.
> 
> Read and Write functions are provided that utilise the passed in
> methods, using the SAX parser in XML/Ada. It's not pretty, it's not
> big and it's not clever, but it's easier than writing custom parsing
> procedures every time. All the programmer has to do is the switch
> statements in the methods to translate from strings to the appropriate
> type and back again. Works nicely for the one-record-per-file
> structure I tend to have.

You could write an ASIS tool to write those switch statement procedures.

Although, if you go the ASIS route, it might make sense to write the
final package directly, rather than using a string-based generic.

-- 
-- Stephe



  parent reply	other threads:[~2002-05-20 16:20 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 [this message]
2002-05-20 17:11                       ` Wes Groleau
2002-05-20 18:13                         ` Marin David Condic
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