Jump to content
xisto Community
crazyfray

Xml For Dynamic Website Content

Recommended Posts

Anyone got a site where they're using XML to generate dynamic content?

I'm thinking of using XML for several elements of the website for my workplace, partially because I can easily generate XML through a simple VBA interface far easier than XHTML (since I'm only considering the content), so that I can set up easy ways of changing that content for the completely computer illiterate people I work with. Also, I'm doing an XML course later, so I want ot get some practice in :)

Most items would be fairly standard ones, such as a random image header (like the imageloaders used for all the XML tutorials!), and a resource browser for students (same principle, but the images are links too). For example, the news items would have a format like:

<?xml version="1.0"?><newsset name="GCS Site Updates">

<newsitem id="1" year="2007" month="11" day="19">
<title>So, it works then...</title>
<author>FR</author>
<description> </description>
<content></content>
<edited changed="false" year="-" month="-" day="-" modtype="-" changedby="-"></edited>
</newsitem>

<newsitem id="2" year="2007" month="11" day="22">
<title>Teething troubles</title>
<author>FR</author>
<description>Didn't work as well as we thought.</description>
<content>So, that didn't work as well as was hoped. Sorry about the downtime, but it'll be for the better.</content>
<edited changed="true" year="" month="-" day="-" modtype="addition" changedby="MA">We're back up now. Thanks for your patience.</edited>
</newsitem>

<newsitem id="3" year="2007" month="11" day="24">
<title>User feedback</title>
<author>FR</author>
<description>Request for people to use the online form.</description>
<content>So, it seems like everyone is happy with the new content, right? Well, that's what I'll assume unless I hear otherwise! So, there's a form at the bottom of this page that you can use to register your (dis)contentment.</content>
<edited changed="true" year="2007" month="11" day="24" modtype="replace">Please use the form below to let us know what we're doing right...or wrong!</edited>
</newsitem>

</newsset>

*****************************


I suspect that in testing, 'description' would be fairly redundant.

Anyway, if anyone has any good XML tutorial sites, that'd be appreciated too.

Notice from jlhaslip:
NB: Didn't use the codebox because it was removing tags.
Quote tags work in those cases

Share this post


Link to post
Share on other sites

I did one project back about a year ago using xml. but I got to be honest I dont remember much and that was the only time I ever used it so I didnt get too deep in it. Had to use a xlst style sheet for it too but like i said I cant remember lol. It was a joint project with another student we barely passed that paper. I wished i had put more effort in to learn it now I dont have time. anyway show us what you doing with it if you can. links etc.

Edited by sonesay (see edit history)

Share this post


Link to post
Share on other sites

What is better to ue XML or CSS?

XML and CSS are completely different languages with very different purposes. XML is a method of storing, organising and transferring data. It is the language behind XHTML, RSS feeds, configuration files and a whole host of other things. It is really easy to work with, especially from 'inside' a programming language, so you can update the XML files automatically, hence why they are used for RSS feeds and podcasts. They are also human readable and editable, which is why they can be used for data storage and configuration. For example, in a survey/questionnaire system I am developing, we are using XML files to store settings, configuration and survey layouts.

CSS is used to define layout and appearance of web pages. The idea was to take HTML back to what it was supposed to be - centred around the content, not the layout. CSS files are used on pretty much every well-designed website to define fonts, colours, layout and position of every element on the page.

It is not really a matter of which is better, but more which one you actually need to use.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.