473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Storing general-purpose and specific entries

I would like to store a number of entries in XML format. For this I
require attributes that describe information common to all entries, as
well as additional information that depends on the type of entry.

What is the best way of solving this in XML, while not contradicting
the standard and ensuring maximum flexibility? I can think of a few
different approaches:

1) Define elements with different names for each type of entry,
something like this:

<greenentry name="something" size="3" greensetting1="x"
greensetting2="y">
<redentry name="something" size="3" redsetting1="x" redsetting2="y">

The problem obviously is that each of the elements would have to
include, in the specification, those attributes (in the case above,
"name" and "size") common to all entries. That doesn't seem ideal.

2) Another solution I can think of, would be to nest specific
information inside a general element, like this:

<entry name="something" size="3">
<greenentry greensetting1="x" greensetting2="y" />
</entry>
<entry name="something" size="3">
<redentry redsetting1="x" redsetting2="y" />
</entry>

None of these approaches seem ideal to me. I would appreciate hearing
any suggestions or recommendations. Have I missed some solution? How
would you do it?
Jul 20 '05 #1
0 969

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tom | last post by:
Hi, I'm designing a website that will use XML to store all the content of my web pages. I will use a PHP script to parse the XML. Should I store the XML in a MySQL database or should I simply...
4
by: Brian Burgess | last post by:
Hi all, Anyone know of any special issues with storing cookies with ASP? I'm trying this with two browsers: One is IE 6.0 with cookies set to 'prompt'. This has been working properly as any...
0
by: Eben Goodman | last post by:
I am storing book isbn numbers in a table. isbn numbers are 10 digit numbers and many start with 0. The data type of the field I am storing this info in is a bigint(16) unsigned. It appears that...
3
by: Dave Smithz | last post by:
Hi There, Being quite new to MS-SQL I would like to ask if there is a general opinion of what approach should be taken to storing things like external documents and images in databases. ...
14
by: Dave | last post by:
Hello all, After perusing the Standard, I believe it is true to say that once you insert an element into a std::list<>, its location in memory never changes. This makes a std::list<> ideal for...
5
by: Kruegy Man | last post by:
I have a WinForm application that has a WebBrowser Control. I can navigate to any website fine. I want to store the link addresses in an array to be called back later. For example, if I...
7
by: C G | last post by:
Dear All, What's the best way to store jpgs in postgresql to use in a web page? I tried to use large objects, but how would you extract them from a table to be viewed in a web-page without...
1
by: None | last post by:
Hi, I have developed webshop application using asp.net 1.1. I'm using DataGrid in one of the pages of my site. During the page load the DataGrid will be binded by around 7500 products(rows). At...
2
by: assgar | last post by:
Hi Developemnt on win2003 server. Final server will be linux Apache,Mysql and PHP is being used. I use 2 scripts(form and process). The form displays multiple dynamic rows with chechboxs,...
1
by: ashishdubey | last post by:
Hi folks I am newbie in this mail api arena.what i am trying to do is storing and retrieving the messages in the database.but whenever i get the message from database and try to preview it(A...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.