[AccessD] XML (was: PDF vs Access)

Gustav Brock Gustav at cactus.dk
Wed Sep 2 03:52:00 CDT 2009


Hi Stuart

To get acquainted with it. And it is simply too easy to justify reinventing a custom method.
Also, it is easy to document and to explain for some other developer who may wish to read the data.

For example, read one XML file with one dataset containing several tables:

        private void InitializeDataSet()
        {
            _dataBaseFile = Path.Combine(_execPath, _dataFileName);
            this.DlDataSet.ReadXml(_dataBaseFile);
        }

Write the (modified) dataset to one XML file:

        private void SaveData()
        {
            this.DlDataSet.WriteXml(_dataBaseFile);
        }

Resulting XML for one table with one record:

<?xml version="1.0" standalone="yes"?>
<DataSetDL xmlns="http://tempuri.org/DataSetDL.xsd">
  <DataTableSys>
    <Id>0</Id>
    <SmtpServer>smtp.webpartner.dk</SmtpServer>
    <SmtpUserName />
    <SmtpPassword />
    <EmailAddressSend>cactus at cactus.dk</EmailAddressSend>
    <EmailAddressReceive>gustav at cactus.dk</EmailAddressReceive>
  </DataTableSys>
</DataSetDL>

/gustav


>>> stuart at lexacorp.com.pg 02-09-2009 10:20 >>>
When reading and writing *my on data*, what advantage does XML give me?

Why would I want to "markup" the data with lots of overhead using tags when I already know 
what it means?

-- 
Stuart

On 2 Sep 2009 at 8:45, Gustav Brock wrote:

> Hi Stuart
> 
> Charlotte is right. In .Net XML is fun, indeed when writing and reading your own data - piece of cake.
> Further, there is no way avoiding XML - it is here to stay wether you like it or not.
> 
> /gustav
> 
> 
> >>> cfoust at infostatsystems.com 02-09-2009 02:16 >>>
> Now, Stuart, come over to the dark side of .Net and learn to love XML. 
> 
> Charlotte
> 
> -----Original Message-----
> From: accessd-bounces at databaseadvisors.com 
> [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart
> McLachlan
> Sent: Tuesday, September 01, 2009 5:13 PM
> To: Access Developers discussion and problem solving
> Subject: Re: [AccessD] PDF vs Access
> 
> Hitting yourself repeatedly over the head with a large brick is better than dealing with XML. 
> :-)
> 
> --
> Stuart





More information about the AccessD mailing list