If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Why don't you give it a shot, this is a very simple XML example, a great starting point. But not even trying makes it seem like you're just looking for someone to write the code for you. Here's the W3Schools link to a bunch of XML examples to start with. Post your first try at it, and I'll be happy to help correct bugs etc.

It's a start, but your groupings are pretty odd, I think. Some questions:
1. You have a grouping of <animals> within <sport> - this would imply you are going to also have other non-animals sports, correct? If not, why would you have that additional layer of animals?
2. You do not have a grouping of each event, which seems odd to me. I would have listed a bunch of <event> groups (you have two in this example), to collect all the information together for each event.
3. You define an item called <linktype>, where I would use an attribute on the <link> tag, like this: <link type="red>http://www.link1.com</link>
4. You group the links together within <links>, and possibly you have a reason for this, but from what I can see so far, I'd say that's extraneous - just list each of the links.

If the events need an ID, then sure, put one in. But if you have no use for an ID, then you could certainly just call it an <event> for each one. For example, if your program will need to directly pull up an event by referencing its ID (seems like a common need), then you'd want an ID. But if your program is simply listing all events, then no ID is needed.

A lot of this (general schema definition) depends on how you're going to use the data, how the functions will be written. That's why I'm asking these questions... it's not that your schema is wrong, just that if I were writing the code to access it, I wouldn't use some of the items you've included.

So what I want to do is to be able to list all links for the "Dogs vs Cats" event.

But I also want to be able to add more links to the "Dogs vs Cats" event over time. How this will happen is I'll pull data from other websites, and if the event name matches "Dogs vs Cats", then add the links to that event. So do you think in this case, the <links> layer would be unnecessary?