Hi there! Welcome to our blog. Don't forget to sign up for our free RSS feed. We Triple Dog Dare Ya! And thanks for visiting!
What’s the big deal with XML? Great question. Everyone settle in, get the popcorn, and let’s start the show!
First of all, let’s define XML: eXtensible Markup Language. It’s a subset or offshoot of SGML (Standardized General Markup Language). XML is not a programming language (although it can look like one). It is simply a set of conventions you can use to create any kind of information structure.
In other words, it’s a language that can be used to create other languages (technically speaking, a meta-language). Specifically speaking, it uses a system of elements (or tags), attributes, and entities to help you describe an information structure. For example, if you wanted to create a markup language for interoffice memos in your office, you could do that with XML.
For example, you’d have XML elements for the subject line, the to line, from line, the body, the cc’s, and the date. A sample document might look like this:
<memo> <date>September 1, 2003</date> <from>Rocky the Squirrel</from> <to>Tony the Tiger</to> <cc>Bullwinkle and Natasha</cc> <subject>Boris's Birthday</subject> <priority>Important</priority> <body> This is just a note to remind you that Boris's birthday is coming up soon. Shall we try to surprise him with a party? Let me know. </body> </memo>
Notice that any XML document must have a root node–an element
at the top of the structure that has no parent. All other elements (or nodes) are nested inside that root node. Also notice that each opening element must have a closing element, and that the elements are case sensitive. <node> is not the same as <Node> is not the same as <NODE> is not the same as <NoDe>.
(There’s a lot more about XML that I won’t cover here, but I promise to get into more details in future newsletters.)
The question before us now is: why would we create an XML document for a memo? First of all, to save time and energy–everyone would be able to create memos without having to think about structure (I teach classes in memo writing, and there’s lots of confusion on structure and layout).
Also, once you have a pile of memos saved in a database or file repository, you’d be able to extract relevant information pretty quickly. For example, we would be able to retrieve all memos that had "Rocky" in the <from> element that were marked with an important <priority>. If we didn’t have this information in XML and searched on "Rocky important" we would likely get memos where Rocky is the recipient (not the author) or where Rocky was mentioned in the memo’s body. And we’d get any memo that had the word important any where in the text (i.e., "I have to run now–have a date with an important person"), instead of just the memos that were marked with an important <priority>.
But here’s the most important reason why we’d create XML versions of any body of information: you can reuse the XMLized information in different contexts. For example, you could open an XML document in a page layout program and make it look very professional. Or you could take the same XML document and present it as part of a Flash application. Or convert it to HTML for display on a web site. Same information, different contexts–a huge, dramatic savings for the company that has to publish information in a variety of media.
I’ve scratched the surface of XML–there’s lots more to cover. Tune in.
Tags: No Comments



0 responses so far ↓
There are no comments yet...Kick things off by filling out the form below.