Real world examples of xml usage

Ok, i’ve been reading some xml tutorials (w3schools, xmlpitstop, etc…) but still didn’t see any meaningful use for it; all examples are either a cd catalog, some slide-out menus and stuff; ok so where can I see some real world examples of xml? don’t know but a cd catalog isn’t that much interesting to describe what xml can do; is there any example showing like the building of a simple site just to get started? i know it’s not supposed to replace html but ok so what else can i do with xml?

XML is not the cosmic panacea. However two things I’ve found XML to be good for:

Data interchange i.e. sending data from one system to another e.g. you might take an XML dump of your timesheet system and input it into your financials package. Or you might stream an XML data feed in real time.

Storing semi-structured information. I’m working on a CMS at the moment where each resource can have a whole bunch of meta-data assigned to it but this meta-data is a bit arbitrary and inter-dependent. Pick one value, and it allows certain other values - that kind of thing.

I could map this into relational tables but it’s a lot of work. RDBMSes tend to work best for very structured, repeatable data. So at the moment I am exploring storing the data about each resource in an XML repository and new resources can be added by uploading a new XML document. Using XML also has the advantage that I can define the document in a DTD and ensure my data is valid.

I’m writing an XML-based CMS too. It was previously based on Access and then upsized to SQL Server, but I have now moved to XML for speed/scalability, cost effectiveness, and ease of backup.

Slightly O/T - what kind of backend are you using?

I would say he is using ASP…

I should be more clear - I mean in terms of an XML storage/retrieval facility…

Flat files? Some kind of XML database like Xindice?

It’s 100% custom written using ASP and the MSXML engine, using an XML schema of my own design (made up as I go along, really). It’s incredibly fast, and should be very scalable (the files are cached in the Application collection using free-threaded XML DOM objects).

The system uses 2 XML files - one for the site data (configuration, pages, users, images), and one for a page layout template. However, I will move to multiple page templates in the near future once the rest of the system is complete.

hey marco, could you show us how is it going?

Interesting…

I would have thought performance would degrade as the XML file/repository got bigger though in all honesty that’s just a feeling I have :slight_smile:

Doesn’t sound like that’s happening though. How much data are you storing? I was looking at something like Xindice to store a set of XML documents. But it may be simpler to store each as a node in one huge “master” XML file.

As another aside (sorry - probably need to start a new thread about this soon) have you had a look at the XML ASP modules from Stonebroom?

The system I am coding is intended for use with small sites, in the order of 20 pages or so. Assuming that each page is 20K of HTML, this is only 400K, which is no problem at all for the XML DOM - remember that it’s loaded and parsed/validated only once (at the start of the application), and then kept in memory.

Naturally I would expect XML documents that are 100s of megabytes in size to pose a significant problem, but then it would merely be a case of switching to a SAX parser, which would take document sizes like that in its stride (people on various lists I’m on are doing this on a daily basis at work).

Hence, I’m sure the system has plenty of room for expansion, and I will run some tests on superhuge XML documents just to see.

With regard to Stonebroom, I am aware of their products, but I don’t have a need for any of them! All I need is ASP and the Microsoft XML 4 objects! :wink:

As far as a demo goes, I intend to migrate my current (rather neglected) web site to the system as its first real test, so I’ll let you know!

SAX parser - good point…

Thanks for all the info. Given me a couple of ideas and it’s always nice to get some validation of the direction I’m heading from the ASPer of the year :wink:

lol! :smiley:

thmz, check this article out: