Top Ten XML Myths

XML is a scary thing. We all know it’s around us””in our web­sites, in our soft­ware, prob­a­bly in our cere­al and in our city water too. Perhaps it’s the ubiq­ui­ty of XML com­bined with its unknown qual­i­ties that makes it seem a tough tech­nol­o­gy to mas­ter, but my recent XML Workflow tuto­r­i­al with Jim Maivald and Cooking With XML real­ly helped me under­stand XML, what it does and doesn’t do, and its uses for today’s design­er. If you’re a design­er for print or the web, read the fol­low­ing ten XML myths and re-learn what you have learned.

10. XML is a spe­cial lan­guage requir­ing spe­cial edi­tors. Some peo­ple may think XML requires expen­sive soft­ware or even web design soft­ware like Dreamweaver to cre­ate. Guess what? It’s total­ly com­posed of plain text and TextEdit or Notepad will write XML just as eas­i­ly as XMLSpy, a lead­ing XML edi­tor.

9. XML is only for the web. I took this tuto­r­i­al at the InDesign Conference, so that’s your first clue that XML does more than just web­sites. XML is data, so you can think of it as a tab- or comma-delimited file, able to be import­ed into any appli­ca­tion that can under­stand it and dis­play it.

8. XML does things to data. As men­tioned above, XML is data and that’s all it is. Without soft­ware like InDesign to parse the data or some­thing like an XSLT file to inter­pret it and style it, XML is just a bunch of text.

Note: XSLT allows XML to be trans­formed and dis­played by style sheets, thus creait­ng a method for dis­play­ing XML data as styled text and visu­al ele­ments. It’s one of the most pop­u­lar ways to pub­lish XML on web­sites.

7. It’s too easy to get bad XML data pub­lished. The beau­ty of XML is that a pars­er or inter­preter (like XSLT) requires valid XML to process it prop­er­ly. There are a lot of rules with XML that must be obeyed, but in the end it’s a boon for XML authors because that means either the XML is valid, and every­thing shows up cor­rect­ly, or the XML is invalid and the appli­ca­tion will let you know. Print design­ers: think of XML as data’s PDF/X-1a. Creating a PDF/X-1a out of a doc­u­ment with RGB images doesn’t gen­er­ate a PDF, but an error. The process makes sure you fix every­thing before you can move on. XML val­i­dates in exact­ly the same way.

6. XML is hard to write. There are some dif­fi­cult things to remem­ber as far as syn­tax goes, espe­cial­ly for XSLT, but XML itself is actu­al­ly straight­for­ward. The log­ic of XML is so sim­ple that prac­ti­cal­ly any­one can write it, and as with HTML there are sev­er­al options for writ­ing XML with­out hav­ing to type a line of code. Exporting data­bas­es as XML is a great way to do just that.

5. XML is a new kind of lan­guage. XML and HTML are actu­al­ly based on the same lan­guage, SGML from the 1970s. Look at the struc­ture of XML and HTML code side by side, and you’ll see they are close­ly relat­ed. If you can write HTML, you are actu­al­ly more than qual­i­fied to write XML after learn­ing a few things about syn­tax and rules.

4. XML hasn’t pen­e­trat­ed the main­stream design appli­ca­tion mar­ket yet. Wrong! Not only is XML being used by some of the biggest design appli­ca­tions out there, some (like Dreamweaver 8) are made of the stuff! At the con­fer­ence I got to know the Tags palette in InDesign, which is not used to cre­ate HTML but to work with import­ed XML in order to pub­lish an infi­nite num­ber of data-driven doc­u­ments in only a few steps. Many oth­er appli­ca­tions out there can lever­age XML in the same way.

Not only are design appli­ca­tions work­ing with XML, most major web browsers includ­ing Internet Explorer are XML-compatible.

3. Displaying XML data is tough. With tech­nol­o­gy like Cascading Style Sheets and the pars­ing abil­i­ties of appli­ca­tions like InDesign, bring­ing XML from pure data to styled data is eas­i­er and eas­i­er. It’s still the last and hard­est step before hav­ing a fin­ished data-driven doc­u­ment or prod­uct, but once you get the hang of it it’s actu­al­ly pret­ty easy.

2. XML has too many rules. If you write HTML, you know that every tag does some­thing dif­fer­ent. is required around the body code, and so on. With XML, oth­er than a few things such as the required DOCTYPE, tags are what­ev­er you want them to be. Make up your own! As long as the XML pars­er or inter­preter knows what to do with them (and you are in con­trol of this as well) you can prac­ti­cal­ly make up the rules.

1. You can get by with­out know­ing any­thing about XML. Depending on your sit­u­a­tion, this might be true. However, you are prob­a­bly already using XML””metadata, InDesign Snippets, pref­er­ence edit­ing and web­pages are all places where XML is in use today. At least a fun­da­men­tal grasp of XML will be nec­es­sary in a few years’ time. You may not make your liv­ing off it, but you will be com­ing across it more and more.

You may also like...

3 Responses

  1. When we made http:// www. kamalas​pa​.com we use an XML file to update the prod­ucts, prod­uct infor­ma­tion, order­ing info, ingre­di­ents, etc for the online store -- we sync that same xml file to the cat­a­log to dynam­i­cal­ly sup­ply the prop­er infor­ma­tion to inDesign so that we can update con­tent on the fly. That should be a clear indi­ca­tion to any­one real­ly won­der­ing the pow­er of XML -- it’s a beau­ti­ful sim­plis­tic lan­guage that’s only one of many in our arse­nal of web design.

  2. Most impor­tant thing about XML is that it allows out­side pro­grammes to deal with data belong­ing to some oth­er soft­ware, with­out intrud­ing into the orig­i­nal software’s secu­ri­ty and pri­va­cy. It can play many dif­fer­ent roles includ­ing that of a data­base, a con­tain­er, an inde­pen­dent doc­u­ment, and data stored via XML files is not depen­dent upon any par­tic­u­lar soft­ware for access. Its a great mark-up. Kudos for the arti­cle, which will add to the pop­u­lar­i­sa­tion of this won­der­ful lan­gauge.

  3. M Jenius says:

    Awesome arti­cle. This is a prime exam­ple of where it’s all head­ed. Any web design­er knows that even though we’ve come a long way since the plain HTML days, we still need fur­ther refine­ment. Expect fur­ther advance­ment in stream­lin­ing between design­ers, devel­op­ers, and tech. Print design­ers, don’t think that you’re com­plete­ly off the hook.

%d bloggers like this: