- Aug 24, 2001
- 1,590
- 0
- 0
I'm creating this XML file for a flash website for a local architect. The flash file handles all the xml parsing functions, and I have to write the xml with all the site's data.
Here's an example. I have to show very basic info for every project, such as Client, Year, Location, etc. What I need to know is wich is the best way to store the data, should I create elements for every item or simply use attributes for a single element?
Using elements:
<project id="01">
<client>Mr. Jones</client>
<year>1999</year>
<location>Malibu</location>
</project>
Using attributes:
<project id="01" client="Mr. Jones" year="1999" location="Malibu"></project>
Both methods are equally valid, but what are the "best practices" when handling XML data? As you may notice, this is the first time I write and XML file.
Here's an example. I have to show very basic info for every project, such as Client, Year, Location, etc. What I need to know is wich is the best way to store the data, should I create elements for every item or simply use attributes for a single element?
Using elements:
<project id="01">
<client>Mr. Jones</client>
<year>1999</year>
<location>Malibu</location>
</project>
Using attributes:
<project id="01" client="Mr. Jones" year="1999" location="Malibu"></project>
Both methods are equally valid, but what are the "best practices" when handling XML data? As you may notice, this is the first time I write and XML file.