Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Should I use XML and HOW?

Status
Not open for further replies.

FuzzyLogistics

IS-IT--Management
Dec 14, 2006
4
US
I am building a new site, and it's going to have a plethora of content. As such, I want to be able to make it as extensible as possible. However, I have no experience with XML, and from all the tutorials I have read, it doesn't look like it's for me. I don't have lists of items, and that's all I see XML doing in tutorials.

I have an encyclopedia, each word has it's own definition (fairly lengthy)

So if you go to "mysite.com/word" it will bring up the description for "word", and so forth.

Should I use XML for this? Why should I use XML for this? and How would I use XML for this?

As far as news goes, I will be adding new articles about twice a week.

I think this would be right up XML's alley, but I have no idea how to implement it, aside from slapping it into my HTML by itself (I have a feeling it wont validate as valid XHTML)

Should I use XML for this? Why should I use XML for this? and How would I use XML for this?

Thanks.
 
You have a much bigger problem than can be answered in a post. See faq426-6460 and pay particular attention to the fourth bullet: that resource is right up your alley.
 
Please don't refer me to a book :(

At the very least give me some basic info here.

Here is what I was thinking about having in the encyclopedia xml file:

<encyclopedia>

<entry>
<phrase>Search Engine Optimization</phrase>
<abbr>SEO</abbr>
<desc>This is the Search Engine Optimization description</desc>
</entry>

<entry>
<phrase>Viral Marketing</phrase>
<abbr>N/A</abbr>
<desc>This is the description for Viral Marketing</desc>
</entry>

</encyclopedia>

But then it would get HUGE! So I should have each one in its own separate file? Then I would parse it with PHP? I don't see the benefit of this really.

Please just tell me what the benefit of doing this is, and I will be on my way :)
 
But then it would get HUGE!
Yep.
So I should have each one in its own separate file?
No, that would defeat the purpose of any kind of data store.

XML might not be right for the job, especially if you aren't planning to manipulate the presentation of the data on-the-fly. If you're, say, retrieving one definition at a time, you might be better off with a database on the back-end.

But for a case study that closely parallels what you want to do, THAT BOOK puts it all together.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top