[Wylug-discuss] XML data storage & GUI design

Geoff Richards qef at ungwe.org
Thu Nov 24 09:23:19 GMT 2005


On Tue, Nov 22, 2005 at 06:09:54PM +0000, Will Newton wrote:
> On Monday 21 November 2005 16:23, Mischa Oliver Altmann wrote:
> 
> > I plan to store aquired data (e.g. sensors) in an XML file. I have long
> > looked for an oppertunity to work with XML but lack just about all
> > experience. Is anyone working with XML? Pointers to good resources (incl.
> > books) would be appreciated.
> 
> I'm not sure time series data is that suited to the XML format. Not that it 
> can't do it, but the strengths of XML are in structured tree-like data with 
> named fields. It may be simpler, easier and more CPU and disk space efficient 
> to use e.g. line-based textual format e.g.:
> 
> XML:
> 
> <readings>
>   <reading>
>     <time>1047638</time>
>     <temperature>10.2</temperature>
>     <humidity>64.2</humidity>
>   </reading>
>   ...
> </readings>
> 
> ASCII:
> 
> 1047638 10.2 64.2

Agreed, but if you insist on XML, I'd recommend this:

    <readings>
      <reading time="1047638" temperature="10.2" humidity="64.2" />
      ...
    </readings>

which would be more efficient and probably easier to get the
data out of.  But if you can use tab separated values or something
then it'll be even easier.

XML is best where you've either got complicated/arbitrary structures,
or have lots of textual content (because it makes handling different
character sets simpler).


-- 

--- Geoff Richards -------------><-------------- http://ungwe.org/ ---
"I tried to fling my shadow at the moon,
 The while my blood leapt with a wordless song."  --  Theodore Roethke




More information about the Wylug-discuss mailing list