Click to See Complete Forum and Search --> : When is XML actually helpful?
The Bear
09-21-2005, 11:39 AM
Hi, I've been learning about XML and all its uses and it seems pretty sweet. However, my boss wants me to make it so that our web site is populated from an xml file rather than a database. This doesn't seem like the use that XML is really intended for. We have no intention of allowing other sites to use the information for something like an RSS feed.
Am I not getting what XML is for? is there any reason to get things like upcoming events and news from an XML file rather than a database?
Thanks
herodote92
09-21-2005, 12:22 PM
I'm asking myself more or less the same question. I'm beginning to get some results using XML, but it doesn't really solve my Web problems. Actually (as I understood it), XML was not really made for the Web, rather for documentation. But it seems that XML is very fashionable by now (I even heard that some databases would use XML format !)
Was is frightening me a little is that XML pages are terribly heavy if you consider the number of bytes, thus heavy to load, transfer etc (even if for transferirng you may zip them). Especially because people have a tendency to use very long and explicit names in tags. So you can easily need 50 or 100 bytes for one single-byte information (a code, for ex).
Well, there are probably pros and cons, as for everything. Still I find it complicated.
the tree
09-21-2005, 03:18 PM
XML is really for communication rather than storage which databases are for.
JPnyc
09-21-2005, 03:31 PM
Well I've heard it referred to as "the poor man's database". I can function as a hierarchical DB if need be.
sheila
09-24-2005, 12:25 PM
It's helpful when you have several different end uses for your content. It also allows you to cross-reference without needing to create special tables or duplicate content.
The Bear
09-27-2005, 02:01 PM
ok, thanks. Sounds like XML isnt the way to go in this case.
madddidley
09-27-2005, 02:34 PM
Databases are goooood and stuff.
www.maddDidley.com
BlackNute
09-27-2005, 11:01 PM
I have been wondering when it would be right to use XML languages and would like to add my thoughts.
I have come to the conclusion that XML is not quite ready to be the web distribution tool of choice in terms of support. I do think that as clients overwhelmingly support XML and related standards that it will become the language of choice for distributing and coding web pages.
In my case I haven't yet found a real efficent use of home brewed XML. RSS is great for distributing content to readers, but its a standard, not extensible by me.
Storing my data in XML files... I just dont see it as giving me any benifit. If I wish to distribute it as XML, grab the data from SQL and do so.
The only other application for XML I can see is shown through RSS. Clients using it as an easily defined standard for talking to each other, maybe a client for a calendar program talking with the server or something.
I dont know, maybe I have missed the point. Comments?
Charles
09-28-2005, 06:09 AM
Raw XML was never intended a a publication vehicle. When was the last time, and when was the first, that you saw a web page in raw SGML?
XML has three uses:
- You can use it for your data base. Well, you've got to use something and comma separated values aren't very human readable. If you want human readability then use XML.
- You can use it to develop your HTML. XSLT and XSL-FO open up some nifty possibilities. But the idea is to run your XML through a processor and generate the HTML and perhaps a PDF verson.
- Unlike SGML, XML applications can be checked for at least some level of correctness without a DTD. We can determine if a document is well-formed even if we can't determine if it is valid. This opens up the possibility that communities can more easily develop their own mark up languages. And you can have combination MLs like XHTML+MathML which means mathematicians can communicate their work. You could still do that in SGML but with gtreater difficulty and you would need a DTD.
Mr Initial Man
10-02-2005, 05:08 PM
Can we use XML to publish a page in something OTHER than HTML or MathML?
Charles
10-02-2005, 05:42 PM
XML is simply a set of building blocks. What you build out of it is up to you.
However, you can't simply make up your own language or even decide to make changes to it. Case in point: munneepenee. XML allows communities to get together and create MLs to suit their communication needs.
And yes, it does have private uses. But it comes with tools (XHTML) to help translate those into something that the community might understand.
herodote92
10-03-2005, 03:37 AM
The main reason why I had to look a little closer at XML was that my organization and several others wanted to be able to exchange some specialized information in a standard way. Every one has its own database system, its own language, and even its own database structure, but we wanted to define a common template, so somebody said that the answer was XML. Well, why not.
Now the problem for everybody is of course to make the DB exports in such a way that the private DB structures and data will comply to the XML template - although this has been studied for a long time beforehand. Still we should be able to do it (I hope so).
My own problem is that the literature about XML and everything related is absolutely dreadful. Just as an example, please read this paragraph (taken out from the W3C 'XSL Transformations (XSLT) - Version 1.0' Web page:
"If the variable-binding element does not have a select attribute and has non-empty content (i.e. the variable-binding element has one or more child nodes), then the content of the variable-binding element specifies the value. The content of the variable-binding element is a template, which is instantiated to give the value of the variable. The value is a result tree fragment equivalent to a node-set containing just a single root node having as children the sequence of nodes produced by instantiating the template. The base URI of the nodes in the result tree fragment is the base URI of the variable-binding element."
Well, my reaction to this is that my lower jaw falls three feet down and intense stupefaction gleams in my eyes. Surely they are right, surely that means something, only I don't know what, neither how this could help me in any way. :eek: :eek: :eek: