Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: Is XML right for this?

From: =?UTF-8?B?SsO8cmdlbiBLYWhycw==?= <Juergen.KahrsDELETETHIS@------.-->
To: NULL
Date: 7/1/2007 8:45:00 PM

ElderUberGeek wrote:

> 1.	Basically this data could as easily be stored in a delimited flat-
> file (as it is now). So what is the advantage in using XML in this
> case? (I know the advantages of XML in general, but in this case where
> the data never changes, I am not sure of the advantage). Actually, the
> XML markup bloats the file making transfer time more...

Yes, the markup is annoying if you are used to
delimited flat files. Are there any chinese characters
in the data ? Are their currency symbols like € ?
Then XML has the advantage that handling Unicode characters
is clearly defined.

> 2.	Should a DTD be used? A XML Schema? Or no need for this. I am
> asking this because suppose in the future some new information is
> added to the records, I think the processing script would need to know
> what version of the XML file is being used and process accordingly?

DTD is more standard, but restricted in what it can specify.
Schema is not quite as standard as DTD, but more powerful
in what it can specify.

> 3.	Should every record in the data be stores as a single node with
> data as attributes? (see example below). I think this is an age old
> dilemma in XML but not sure of the answer...

Yes it is an old problem. Date, Time, Price, Qty are simple
enough to be stored in attributes. But article descriptions
may be better placed into the node's text.
 
> Should XML look like this?
> <record TNo="100" Date="010107" Time="1020" Price="3.2" Qty="7"></
> record>

Yes.

> Or like this?
> <record>
> 	<Tno>100</TNo>
> 	<Date>010107</Date>
> 	<Time>1020</Time>
> 	<Price>3.2</Price>
> 	<Qty>7</Qty>
> </record>

If the tool you are using can handle this easily,
you shouldnt worry too much.



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent