Fog Creek Software
Discussion Board




XML - the only practical use for XML is RSS?

I recently came across an article (I can't remeber the link, it was over a week ago) which stated that the only useful practical thing to come out of XML is RSS.

It did not register on my radar when I first read the article. Since then I have been mulling on XML and trying to figure out where have i used it.

Two years ago XML was heavily hyped - like Web Services now. We had pitches from companies like exilon that wanted us to buy their XML servers - I never understood what that was.

As far as I am aware metedata does not use XML for data descriptions - I could be wrong.

From my research online - I have read that XML are used for data exchange between applications. We use EDI at our company which is a legacy application but works well.

XML databases were also listed in my google search on the uses of XML. I am not sure what exactly is an XML database - is it a RDBMS designed specially to store XML data?

Has any posters here used XML practically in applications they designed or at work?

Ram Dass
Friday, August 22, 2003

Unfortunately, some of RSS's problems are because it's in XML. People are generating XML "by hand" -- that includes using templating systems like found in CityDesk and MovableType. It's hard to cover all your bases ahead of time, and sometimes you just plain end up screwing up and creating invalid XML.

Writing XML by hand is probably an order of magnitude harder than most people think it is. Parsing invalid XML -- which most RSS readers are forced to do, to stay competitive -- is also very time consuming. Most RSS readers can't rely on a traditional XML parser, because they have to be much, much too liberal in what they accept to use one.

Brad Wilson (dotnetguy.techieswithcats.com)
Friday, August 22, 2003

i built an XML based medical record sharing system for a hospital.

.
Friday, August 22, 2003

I use XML on my resume.

m
Friday, August 22, 2003

Isn't SVG written in XML?

Nick
Friday, August 22, 2003

Anything you would use a csv file for could be used in XML. It seems to be fairly popular and there are alot of parsers out there so if someone wants it use it. I use it for config files, my resume so I can generate different file types, and serializing data between different languages.

Tom Vu
Friday, August 22, 2003

http://weblog.burningbird.net/fires/000581.htm

That link is good for a laugh.

To answer the original question, XML is a great for any type of data that is hierarchical in nature and for which storage size isn't very tight.  Using existing and well tested XML libraries sure beats writing you own validation and parsing systems for custom data formats.

The technology sure was overhyped though to the point where one might think it is capable of curing cancer...

Mister Fancypants
Friday, August 22, 2003

the hospital system I mentioned above was specifically targeted towards cancer patients. :-)

.
Friday, August 22, 2003

The hype is a useful part of XML. Because it's lead to wide adoption, and thus a large number of XML interfaces on systems which would otherwise dream up their own, and a large toolkit, including conversion tools between the different XML interfaces.

mb
Friday, August 22, 2003

and that web thing...remember that? What a hypefest.

Everyone developer I know is using xml. Many are using it extensively.

Do you use mozilla/firebird? there's xml in there (admittedly it the horrendously ugly xml serialization of rdf but it's xml). How many people will be using Longhorn? Hundreds of millions (if they EVER actually release it). Talk about xml. Microsoft is xml nuts!  Lotus Notes spits out xml these days. This stuff is actually very useful.

people are using this:
http://www.amazon.com/gp/browse.html/104-7204957-6191113?node=3435361
to build stuff like this:
http://mab.mozdev.org/

And I'm riding the web services hypefest and it's all built on xml. If hype pays the bills, I'm all for it.

fool for python
Friday, August 22, 2003

Funny, I just started using XML in a real app today.  (Apart from some builtin stuff like ConfigSettings in .NET.)

I wouldn't want to use XML in place of a database, or for really big files (though I know some folks do), but there's some stuff about XML that I really like for little data files:

Really easy to extend your schema.

Handles jagged arrays nicely, ie some elements have no children, others have children 3 levels deep, no problem.

At least in .NET, nice friendly tools are built in for working with XML.  Singling out a chunk of data or iterating through some particular subset of data is just breezy easy.

Having your data human readable and easily editable is very handy.

Yeah, XML was perhaps a little overhyped.  Maybe still is.  But it's a handy tool to have in your tookit, just the same.

Matt Conrad
Friday, August 22, 2003

http://www.research.avayalabs.com/user/wadler/language.pdf

as
Saturday, August 23, 2003

I was at a Microsoft developers' conference in Israel last month. They basically said XML's greatest strength is allowing the sharing of information between disparate systems.

Chi Lambda
Saturday, August 23, 2003

Ant uses XML, and I think they have every reason to justify the choice.

S.C.
Saturday, August 23, 2003

EDI seems great on your system. EDI becomes an issue when you deal with multiple systems - everyone has their own recipe and their own "personal touches"

Reading EDI is *hard*. You can learn it, but it's still not natural and you still need an implementation guide. You *definitely* need an implementation guide or validation tool if you're trying to figure out why a document is failing.

OTOH, you could be reading an XML document your second day on the job.

Compare:
IT1*023*1*EA*10.84**BP*E1147C*VP*E-1147C*UP*729374914811

vs.

<Item LineNbr="23">
  <ItemQty>1</ItemQty>
  <UOM>EA</UOM>
  <UnitPrice>10.84</UnitPrice>
  <PartNbr Qual="BP">E1147C</PartNbr>
  <PartNbr Qual="VP">E-1147C</PartNbr>
  <PartNbr Qual="UP">729374914811</PartNbr>
</Item>

Which would you rather deal with?

BTW, Microsoft Biztalk's parsing engine is all XML.

Philo

Philo
Saturday, August 23, 2003

http://www.eod.com/devil/archive/xml.html

Sam Livingston-Gray
Saturday, August 23, 2003

For inter-server communications over normal HTTP, returning results in XML has reduced much pain.

rexguo
Saturday, August 23, 2003

A couple of ASP-based applications we have at my workplace use XML files as a sort of disconnected recordset.

Good for storing data that either gets updated on an irregular basis (no need to pull down a new copy of data that hasn't changed), and for providing all possible data and giving the user a limited view at first, with the option of displaying more if they want to see it. Also useful when you're loading flexgrids, which don't exist until the client loads the control.

You can always use flat files, but ADO allows you to save directly to XML and load them the same way, which saves us time and effort.

Brad Vaughan
Saturday, August 23, 2003

Yes.  I prefer to call XML ".INI file 2.0" though.

annnnddd wwwweeeee!
Saturday, August 23, 2003

SGML/XML is useful for INI files, but it's also a viable document format. I've maintained documents in the Docbook DTD and it's just as easy as any other markup language. The changes between SGML and XML (such as the loss of the <tag/text/ shorthand for <tag>text</tag>) are annoying, but not critical.

Why would I do that, rather than using a full blown word processor? Well, mainly because "a full blown word processor" means "Microsoft Word", and I'd rather write on tanned skin using my own blood than try and maintain a document in Word ever again.

Peter da Silva
Sunday, August 24, 2003

S.C.,

I disagree with your suggestion that Ant's use of XML is a good thing.

XML is a markup language for data, Ant is a scriptable make tool. In my experience when a scripting/programming language is tag-based it is generally quite clumsy (CFML, XSLT, Ant).

http://today.java.net/pub/a/today/2003/06/10/jython.html demonstrates using Jython to script Ant instead of XML, your opinion may differ, but I side with the author of this piece (although I'd think JavaScript, with its more Java-like syntax, would be a better choice of scripting language).

"XML sucks" is this year's "EJB sucks". In the case of either technology it's worth taking a step to make sure that using the technology provides you benefits other than mere buzzword compliance.

Walter Rumsby
Sunday, August 24, 2003

Philo,

>IT1*023*1*EA*10.84**BP*E1147C*......

This is all too common when doing integrations to big iron IBM OS/390 type machines. IBM mainframes have 2 major disadvantages when it comes to using XML:

1) Old school programmers get all bitchy when they have to use what is called variable blocked datasets; that means text files with variable length lines. Fixed length lines is what they love.

2) Because most COBOL die hards uses the cut 'n paste programming technique they are very reluctant to actually make changes in their file parsing code from 1977.

Then again when thinking about it, parsing textlines with some delimiter is not harder than parsing XML really.







vs.

<Item LineNbr="23">
  <ItemQty>1</ItemQty>
  <UOM>EA</UOM>
  <UnitPrice>10.84</UnitPrice>
  <PartNbr Qual="BP">E1147C</PartNbr>
  <PartNbr Qual="VP">E-1147C</PartNbr>
  <PartNbr Qual="UP">729374914811</PartNbr>
</Item>

Anonymous
Monday, August 25, 2003

I use it mainly for shutteling data between applications. As far as I can see XML has become a standard tool in almost any programmers kit.

Just me (Sir to you)
Monday, August 25, 2003

XML is in the year 2000 what CSV had been in the eighties.

char* full_name()
Monday, August 25, 2003

Have a look at http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&ixPost=953 

Simon Lucy
Monday, August 25, 2003

But delete the %A0 linefeed first, sigh.

Simon Lucy
Monday, August 25, 2003

I think any app that uses structured data, but doesn't require a full-blown database, and/or needs that data to be shared with other apps quickly & easily could benefit from XML.

You don't need sql to store a personal phone book, and a sql dump isn't exactly as portable as an xml file.

www.marktaw.com
Monday, August 25, 2003

OK, now for a dumb question:

I understand that the supposed benefit of XML is that it permits data interchange between unrelated systems.  Is this true in practice?

The problem that I see is that an XML document makes sense only if you have the accompanying DTD or schema, but that only describes the syntax. The semantics of a document are not described anywhere.

This means that an application cannot magically "make sense" of an XML document given only its DTD or schema.

As a practical example, consider the following table layout systems:

1. The HTML system (< TR >, < TD >, < COLSPAN >, etc.)
2. A system based on giving each cell explicit X, Y coordinates, plus height and width.

Clearly, both systems are workable, but is it possible for a word processor to translate from one to the other without any application-specific code?

Am I wrong in my thinking?

David Jones
Monday, August 25, 2003

There is never any "semantics" in a bunch of bits. Neither is there any "semantics" in a stream of sound, but still we manage to talk with each other.
Do you believe that a datamodel or a dbschema holds more "meaning" than an XSD or DTD? Yet still DB's seem to be successfully used in a very many inter application scenarios.

Just me (Sir to you)
Monday, August 25, 2003

There are no semantics in a stream of sound, but communication works because we both implement a protocol called "English".

Put me in a room with someone who speaks only Swahili and the communication fails.

XML was hailed as a technology that permits unrelated systems to interoperate.  It's as if there's a magical way of expressing myself so that I can be understood by a Swahili speaker.  Sorry, this doesn't work.

XML may be great as a storage format, or a method of talking to a database, but as an interchange protocol it accomplishes nothing new.

David Jones
Monday, August 25, 2003

  XML + XSL does add something new and does allow unrelated systems to interoperate.  Many organizations have data about the same kind of things but store and describe that data differently.  It is a fairly simple thing to extract a schema from that data.  Using XSL you can quickly and easily map data from one schema to another allowing for easy data interchange without altering either system.

  This is a huge win for larger organizations that need to exchange data with trading partners.  Instead of spending time agreeing on a format for data interchange or setting up you just solve your business problem. 

  Programmers who don't know XSL 3 years from now will find it hard to find a job. 

K
Monday, August 25, 2003

Re XML and RSS, that's the dumbest thing I've heard. Firstly, RSS isn't all that great. Secondly, the XML-based APIs from Google, Amazon and eBay are being used for very practical things.

pb
Monday, August 25, 2003

Another way of looking at it - XML is just human-readable EDI with more parsing and translation tools available. EDI has been used for decades.

To translate from EDI to EDI generally requires a six-figure server installation. To translate from xml to xml requires a weekend's worth of work in xsl.

Do the math. ;-)

Philo

Philo
Monday, August 25, 2003

David Jones: but with a simple XSLT script, you could map all Swahili messages to English!  =-)

Alyosha`
Monday, August 25, 2003

Even if your Swahilian friends were fluent in English this does not mean they would understand funny cultural entities such as "Poll Tax", now would they? There is nothing in those 8 syntactic marks that carries the "semantics".

Just me (Sir to you)
Tuesday, August 26, 2003

*  Recent Topics

*  Fog Creek Home