Page 1 of 1

XML in the real world?

Posted: Thu Aug 01, 2002 5:42 pm
by JPlush76
I've been reading up on XML for a while now and looking at little snippets.. but I still haven't seen a good "REAL WORLD" use for them for your average web programmer.

could someone give me one or two good reasons for using xml?

seems to me like a database could be used intstead of xml :roll:

thanks!


p.s. I went to http://www.w3schools.com already :)

Posted: Fri Aug 02, 2002 5:46 pm
by volka
When you take a closer look to msdn library you will find the tree on the left side to be written in XML an formatted by your browser. ok, this was only one example but I confessed yesterday to be a microsoftie so it came into my mind :D

For html-presentations xml has three advantages for me.
  • with xslt some of the calculations can be done client-side
  • data can be shipped through any text-based channel if they have to
  • I can seperate the data from the layout
there are other advantages but I haven't used them yet :D
xml is no messias of data-storage but sometimes quite nice

Posted: Fri Aug 02, 2002 5:49 pm
by JPlush76
yes, I saw all that but I mean like real world comparisons

like if I'm trying to do something on an ecommerce site the old fashioned way, how can xml help with that?

or things like that

Posted: Fri Aug 02, 2002 6:08 pm
by volka
like any standard does ;)
Important is, that many people use it and (often as result) there is well support for it (tools, platforms, etc.)
It's like odbc. There are much more database-systems but in some way you can rely on that there is a tool, a lib or whatever that can handle it (i.e. jdbc-odbc-bridge, mysql-odbc-driver - it all comes back to odbc :D )
In case of xml support is wide spread and interdisciplinary
i.e (keeping the example of msdn) using a xml-database you can request a complete xml-document by xpath and forward it directly to a browser where it is formatted according to the users settings. Two diffrent worlds but they perform on the same source.
But now I sound like a xml-disciple. As mentioned I make seldom real use of it, so may be there's another one who has to say more about it :roll:

Posted: Sat Aug 03, 2002 3:35 am
by haagen
Oftopic warning :!:

The Ericsson T39 phone uses xml to syncronise the adresses and profiles with you computer.

real world XML

Posted: Sat Aug 10, 2002 12:25 pm
by chopsticks
well, there are lots of examples of where XML is superior to a database. simply put: databases tend to require a structure defined in advance, and it's difficult to change that structure.

i.e. if you want to add another field to a RDBMS (relation database management system) it can be quite a pain in the arse.... as opposed to just "inventing" a new tag in XML.

***

but what I'm personally working on (hotel reservations) involves multiple "databases" of information that changes in real time.

example: there are 5 main hotel consolidators; each has their own database system, each has their own notation. [some might have different columns/fields with names like 'PETS', 'CABLE TV', etc. and have values of 'Y' or 'N'.... where some other consolidators might have one large field called 'AMENITIES' and have values like '104,225,227,229,303,404', etc.]

now imagine trying to communicate with each one of those databases (even if you COULD get the entire database mirrored locally to you in real-time).

XML lets the data define itself. Then you can parse the XML data (with standard IF-THEN type of statements) via PHP, PERL, ASP, whatever. Dynamic loading of different CSS, Javascripts, or XSL or HTML in order to display your data (even FLASH if you wanna get jiggy with it).

What that means is that you'll be in real-time communication (your server to the XML source server... which you can think of as an XML - database). Your server will hand the data to the client -- who won't have any idea whatsoever that your data isn't generated by you.

Hope that helps.

http://www.chopsticks.com
Chopsticks Travel Network - Discount Hotels / Hotel Discounts

Posted: Mon Aug 12, 2002 6:40 pm
by JPlush76
yep, that helped a great deal actually

so its real strength is a communication standard for exchanging data?

Posted: Fri Aug 23, 2002 2:11 pm
by hob_goblin
some points:

1) It is readable by humans, I can look at an xml file and see quick structure, and make sense (if the author didnt name things all weird)

2) It is more public, A common use for it is for news. Websites will store their headlines in an xml file and then people on other sites can have a quick "headlines" box with a link to the article, all sharing the same xml file.

3) It helps connect servers.. Server A and Server B can extract data off of Server C without complex database interactions or permissions being set all special.

4) It is more compatible. For instance, if i have Host A, and host a goes bankrupt and tells me to move.... Host A had mysql but Host B has NOTHING. If i would have used XML, It wouldn't matter.. because xml is just spiffy text files.

it goes on and on, im helping myself realize xml isn't that bad as im saying this..

Posted: Mon Aug 26, 2002 12:20 am
by JPlush76
yep I realize those things hob, but they aren't "everyday" occurences on most websites I've been involved with. In those cases, yes I can see XML being key but for most sites I havne't seen a real use for it yet :(

Posted: Mon Aug 26, 2002 1:34 pm
by nielsene
Well users may never know that a site is using xml. That's part of the beauty of it. XML is a way of encoding data that is understandable to both computers and humans, yet is easily transformed into forms even easier for either of the two at need. If your web-site plans to offer any sort of "information export" or gathers information from other sites; it could very well use XML to structure the transport of information. The XML document you receive you could parse and insert relevant bits into the DB, or pass it through XSL to change to HTML, etc.

Maybe you have both webpage display and and email newsletter, you could potentially generate a single XML document that you pass though transforms to generate both formats. But again, the user would never know, so its hard to judge XML in the real world off what you see.

Uses of XML

Posted: Wed Sep 04, 2002 11:31 pm
by sjunghare
Dear firends,

Look at the article comes with How XML is good for :arrow:

http://www.fawcette.com/xmlmag/2002_01/ ... efault.asp

regards,
Sachin