SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


What is XML?


What is XML?

Author
Message
peter-258331
peter-258331
Forum Newbie
Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)Forum Newbie (1 reputation)

Group: General Forum Members
Points: 1 Visits: 1
Just plain out of date.
Adam Wilbur
Adam Wilbur
Hall of Fame
Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)Hall of Fame (3K reputation)

Group: General Forum Members
Points: 3046 Visits: 591
Awesome article. You said what we were all thinking. "Who actually uses this crap?"



A.J.
DBA with an attitude
DavidSimpson
DavidSimpson
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1821 Visits: 1095

Good article. Unfortunately we are stuck with a vendor that thinks XML is the best and only solution to data transfers, yet they have not idea how to properly format the XML and don't believe in a DTD's or schemas. Basically all they deliver is a text file with tags and all we get is a bunch of headaches. I still believe XML has it’s place but after being forced to use it, I'm starting to think that it’s just a buzz-word used by management and resumes.

David





Stephen Hirsch
Stephen Hirsch
SSChasing Mays
SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)

Group: General Forum Members
Points: 634 Visits: 161

Thanks for all your kind words. A few thoughts.

As it says in the heading in italics, I originally wrote this 7 years ago. I couldn't get it published then, because it was (and still is, really) counter to the current orthodoxy. I really don't understand the allure of what is essentially a failed idea.

What are XML languages good for? A major clue is in their name: markup languages. Markup languages are created for marking up text. They're not created for, nor are they good at, data transfer or data storage.

Finally, if you do use XML for whatever reason, I strongly recommend sticking with DTD's, as opposed to the far cooler XML Schemas. In my opinion, the extra you get from schemas is not worth the extra obfuscation; in addition, schema processing is still pretty immature. During my time trying to implement the SPL project for the FDA, the official schema compiled in XMLSpy (as an XML file) but didn't compile in another tool (as a schema). What do you do in that case?


Joe Landau
Joe Landau
Forum Newbie
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)

Group: General Forum Members
Points: 2 Visits: 7
A good article; thanks. If you ever get the urge to do another, I've long been looking for the answer to: How do you create or consume XML from within your programs?
Taconvino
Taconvino
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 16

Very good article! Although there's a point I don't agree with: XML is a markup language technology (as it's name clearly states), and as such, it can be used for anything we want (yes, including data storage/transfer/formatting/etc... just as HTML).

XML is not the problem. The real problem begin with us (developers), trying to use it for everything. As an old saying goes: "With a hammer in my hand, every problem looks like a nail".

IMO, XML has its place somewhere... it's up to us to find such place, that is most likely different for each one of us. Try to see if the nail has some markings on its head before you start hammering away. Yes, a hammer will drive the screw in any way, but maybe a screwdriver can get the job done faster and without so much effort.


kagemaru
kagemaru
SSC-Enthusiastic
SSC-Enthusiastic (154 reputation)SSC-Enthusiastic (154 reputation)SSC-Enthusiastic (154 reputation)SSC-Enthusiastic (154 reputation)SSC-Enthusiastic (154 reputation)SSC-Enthusiastic (154 reputation)SSC-Enthusiastic (154 reputation)SSC-Enthusiastic (154 reputation)

Group: General Forum Members
Points: 154 Visits: 68
Hello,

I have not waited XML to put a word document between two ###VERYLONGDOCUMENT### and tell my remote client to use these tags to decode. XML is an xtremely marketed language (add some XML stuff in your resume), I can not still see where the revolution is.
I have not see any developer using DTD to handle dynamically different document formats.

In most of cases, they will state together what will be the XML structure to have their program running well : So, what is the difference with a csv file ?
Stephen Hirsch
Stephen Hirsch
SSChasing Mays
SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)SSChasing Mays (634 reputation)

Group: General Forum Members
Points: 634 Visits: 161

"How do you create or consume XML from within your programs?"

First of all, let's ban the word "consume" from any discussion of data . That includes "web services"

Oracle has very nice conversion functionality between XML and its relational model. I'd look there first.

"XML is a markup language technology (as it's name clearly states), and as such, it can be used for anything we want (yes, including data storage/transfer/formatting/etc... just as HTML)"

No argument there. My point is that XML languages (I feel like the GNU/Linux guy) don't do anything but markup text well. I can buy a car with dimes. Why would I want to?


Sam C
Sam C
SSC Journeyman
SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)SSC Journeyman (89 reputation)

Group: General Forum Members
Points: 89 Visits: 4

Just to throw some balance to the discussion, let me be the lonely voice of dissent.

What the author says about XML could be said about almost any other technology available to store/share data. There is no universal solution that can be adapted to every case. For simple cases, an old fashioned text file is more than enough, but as the complexity increases so does the solution. Files used by a single application can be whatever a programmer wants and they usually work fine, but as applications begin to interact with one another the simple solutions show their limitations. Interaction implies well defined interfaces, and XML provides an great way to describe and publish an interface. Not the only way, for sure, but it has distinctive advantages over other ways like COM, IDL, header files or EDI. If you program in an isolated environment this is a non issue, but if you need to write programs that consume data from vastly different sources, you need some standard. Enter XML. The wide adoption of this format has made it the de-facto standard, and that's something GOOD if you are in the business of data publishing/consumption.

By claiming that XML is overly complex, the author is ignoring one of its key features, which is the fact that there is a standard, and this fact has made possible the development of many tools and language constructs (most of them freely available) designed specifically to deal with all the complexities of XML. This is what makes XML a good choice for many projects (notice I don't say "for every project"). As an example, compare with the still popular comma delimited file: If you are processing information sent in that format, you either trust each line has the same number of fields or write code to deal with exceptions. Same for the actual data: if the third field has to be a date, you have to write your own code to check for it. In general, you end up writing code that is custom made for a particular file, and if the the file format changes, you usually need to change your code. Compare that with the XML solution: once you agree on a particular schema (including a DTD), all the grunt work is already coded in most XML frameworks, you only worry about processing the data.

Maybe in the old days XML had to be manually processed and validated, but we've come a long way, and nowadays most XML traveling the net is never seen directly by any user, it's just processed by highly optimized code that works precisely because for once we have a format with almost universal acceptance. I don't see anything wrong with that.

If you don't like XML, you are free to use whatever format you like, but if you need to interchange information with the rest of the world, don't expect everyone to adapt to your own format. In fact, just about everybody already adapted to XML, so why not use that to your advantage?.


Taconvino
Taconvino
SSC Rookie
SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)SSC Rookie (41 reputation)

Group: General Forum Members
Points: 41 Visits: 16

"No argument there. My point is that XML languages (I feel like the GNU/Linux guy) don't do anything but markup text well. I can buy a car with dimes. Why would I want to?"

That's a good point. But still, a tool is a tool, and as such, you can't expect it to do the work for you, nor it will make it better if you don't use it properly. Think of it as two different car dealers. Each of them has a sign out front. The first one reads: "Mustang for sale: $100.000". The second one reads "Mustang for sale: $100.000. 5% Discount if you pay with dimes". My point is that the "Why would I want to?" part can have a lot of explanations. But it's still up to us to choose one. In this particular case, I would put $5.000 against my laziness to gather the dimes. Tuff call...

Yes, XML does nothing more than formatting text well. But, if that's what I need, it just might worth the shot. Why not? Everyone else seems be using it! (just kidding... )


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search